Feel
4.3
The best way to improve your game's feel and make it extra juicy
|
This class lets you randomly spawn objects within its bounds (defined by a 3D collider) More...
Public Types | |
enum | StartModes { StartModes.Awake, StartModes.Start, StartModes.None } |
the possible start modes More... | |
enum | ScaleModes { ScaleModes.Uniform, ScaleModes.Vector3 } |
the possible scale modes you can use to rescale objects More... | |
Public Member Functions | |
virtual void | InstantiateRandomObject () |
Spawns a random object from the pool of choices More... | |
Public Attributes | |
StartModes | StartMode = StartModes.Awake |
whether this instantiator should auto trigger on Awake, Start, or never More... | |
string | InstantiatedObjectName = "RandomInstantiated" |
the name to give to the instantiated object More... | |
bool | ParentInstantiatedToThisObject = true |
if this is true, the instantiated object will be parented to the spawner More... | |
bool | DestroyPreviouslyInstantiatedObjects = true |
if this is true, every time InstantiateRandomObject is called, any previously instantiated object will be destroyed More... | |
List< GameObject > | RandomPool |
the list containing all the objects that can potentially be instantiated More... | |
Vector2Int | Quantity = new Vector2Int(1, 1) |
the min and max bounds to use to determine a random quantity of objects to spawn More... | |
ScaleModes | ScaleMode = ScaleModes.Uniform |
the scale mode to use (uniform scales the whole object, Vector3 randomizes x, y and z scale elements More... | |
float | MinScale = 1f |
the min scale to use in uniform mode More... | |
float | MaxScale = 1f |
the max scale to use in uniform mode More... | |
Vector3 | MinVectorScale = Vector3.one |
the min scale to use in vector3 mode More... | |
Vector3 | MaxVectorScale = Vector3.one |
the max scale to use in vector3 mode More... | |
bool | InstantiateButton |
a test button for your inspector More... | |
Protected Member Functions | |
virtual void | Awake () |
On awake we instantiate if needed More... | |
virtual void | Start () |
On Start we instantiate if needed More... | |
virtual void | Instantiate () |
Instantiates as many objects as needed, clearing previously existing ones if needed More... | |
Protected Attributes | |
Collider | _collider |
List< GameObject > | _instantiatedGameObjects |
Vector3 | _newScale = Vector3.zero |
This class lets you randomly spawn objects within its bounds (defined by a 3D collider)
|
protectedvirtual |
On awake we instantiate if needed
|
protectedvirtual |
Instantiates as many objects as needed, clearing previously existing ones if needed
|
virtual |
Spawns a random object from the pool of choices
|
protectedvirtual |
On Start we instantiate if needed
|
protected |
|
protected |
|
protected |
bool MoreMountains.Tools.MMRandomBoundsInstantiator.DestroyPreviouslyInstantiatedObjects = true |
if this is true, every time InstantiateRandomObject is called, any previously instantiated object will be destroyed
bool MoreMountains.Tools.MMRandomBoundsInstantiator.InstantiateButton |
a test button for your inspector
string MoreMountains.Tools.MMRandomBoundsInstantiator.InstantiatedObjectName = "RandomInstantiated" |
the name to give to the instantiated object
float MoreMountains.Tools.MMRandomBoundsInstantiator.MaxScale = 1f |
the max scale to use in uniform mode
Vector3 MoreMountains.Tools.MMRandomBoundsInstantiator.MaxVectorScale = Vector3.one |
the max scale to use in vector3 mode
float MoreMountains.Tools.MMRandomBoundsInstantiator.MinScale = 1f |
the min scale to use in uniform mode
Vector3 MoreMountains.Tools.MMRandomBoundsInstantiator.MinVectorScale = Vector3.one |
the min scale to use in vector3 mode
bool MoreMountains.Tools.MMRandomBoundsInstantiator.ParentInstantiatedToThisObject = true |
if this is true, the instantiated object will be parented to the spawner
Vector2Int MoreMountains.Tools.MMRandomBoundsInstantiator.Quantity = new Vector2Int(1, 1) |
the min and max bounds to use to determine a random quantity of objects to spawn
List<GameObject> MoreMountains.Tools.MMRandomBoundsInstantiator.RandomPool |
the list containing all the objects that can potentially be instantiated
ScaleModes MoreMountains.Tools.MMRandomBoundsInstantiator.ScaleMode = ScaleModes.Uniform |
the scale mode to use (uniform scales the whole object, Vector3 randomizes x, y and z scale elements
StartModes MoreMountains.Tools.MMRandomBoundsInstantiator.StartMode = StartModes.Awake |
whether this instantiator should auto trigger on Awake, Start, or never