Preparing search index...

    Used to instantiate prefabs across the network. Prefabs must be added to the prefabs list or autoInstantiate list in order to be instantiated.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    api: Record<string, any>

    Generic 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.

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    isEnabledInHierarchy: boolean

    Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.

    name: string
    sceneObject: SceneObject

    The SceneObject this component is on.

    uniqueIdentifier: string
    updatePriority: number

    Methods

    • Parameters

      • prefab: ObjectPrefab

        The prefab to instantiate.

      • OptionalonSuccess: (rootInfo: NetworkRootInfo) => void

        Callback that executes when instantiation is complete.

      • Optionalpersistence: Persistence

        The persistence setting for the instantiated object.

      • OptionalclaimOwnership: boolean

        Whether to claim ownership of the instantiated object.

      • OptionalworldPosition: vec3

        The world position of the instantiated object.

      • OptionalworldRotation: quat

        The world rotation of the instantiated object.

      • OptionalworldScale: vec3

        The world scale of the instantiated object.

      Returns void

      Use instantiate() instead

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Checks if the instantiator is ready.

      Returns boolean

      true if the instantiator is ready, otherwise false.

    • Registers a callback to be called when the instantiator is ready.

      Parameters

      • onReady: () => void

        The callback to register.

      Returns void