ReadonlyapiGeneric object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.
If disabled, the Component will stop enacting its behavior.
ReadonlyisReturns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.
ReadonlysceneThe SceneObject this component is on.
ReadonlyuniqueAdds a new SceneEvent, triggered by eventType events, to the ScriptComponent.
Destroys the component.
The prefab to instantiate.
OptionalonSuccess: (rootInfo: NetworkRootInfo) => voidCallback that executes when instantiation is complete.
Optionalpersistence: PersistenceThe persistence setting for the instantiated object.
OptionalclaimOwnership: booleanWhether to claim ownership of the instantiated object.
OptionalworldPosition: vec3The world position of the instantiated object.
OptionalworldRotation: quatThe world rotation of the instantiated object.
OptionalworldScale: vec3The world scale of the instantiated object.
Returns the SceneObject the component is attached to.
Returns the Transform this component is attached to.
StaticgetReturns the name of this object's type.
Instantiates a prefab across the network. The prefab must be included in the "Prefabs" list of the Instantiator's inspector.
Prefab to instantiate. Make sure it's included in the "Prefabs" list!
Optionaloptions: InstantiationOptionsObj | InstantiationOptionsOptional settings for the instantiated object.
OptionalonSuccess: (networkRoot: NetworkRootInfo) => voidCallback that executes when instantiation is complete. Overrides the onSuccess callback in options if specified.
Returns true if the object matches or derives from the passed in type.
Checks if the instantiator is ready.
true if the instantiator is ready, otherwise false.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Registers a callback to be called when the instantiator is ready.
The callback to register.
Removes a previously added SceneEvent from the ScriptComponent.
Tries to spawn a prefab from a data store.
The data store.
Information about the owner.
Used to instantiate prefabs across the network. Prefabs must be added to the prefabs list or autoInstantiate list in order to be instantiated.