PrefabResource.instantiate() method

Signature:

instantiate(opts: {
        parent?: Component3D;
        abort?: AbortSignal;
    }): Promise<import("../../../scripting").ModelComponent | import("../../../scripting").AudioComponent | import("../../components/dialog/dialogcomponent").DialogComponent | import("../../components/iframe/iframecomponent").IframeComponent | import("../../../scripting").VideoComponent | import("../../../scripting").TerrainComponent | import("../../../scripting").EnvmapComponent | import("../../../scripting").BackgroundComponent | import("../../../scripting").LightingComponent | import("../../../scripting").TextComponent | import("../../../scripting").FogComponent | import("../../components/camera/cameracomponent").CameraComponent | import("../../../scripting").MeshComponent | import("../../../scripting").ImageComponent | import("../../../scripting").WaterComponent | import("../../../scripting").PostProcessingComponent | import("../../../scripting").ReflectorComponent | import("../../../scripting").RainComponent | import("../../../scripting").SpawnComponent | import("../../components/vrmanims/vrmanimscomponent").VRMAnimsComponent | import("../../../scripting").WindComponent | import("../../../scripting").KitBashComponent | import("../../../scripting").AvatarComponent | import("../../../scripting").MagneticFieldComponent | import("../../../scripting").PlatformComponent | import("../../../scripting").CloudComponent | import("../../components/circle/circlecomponent").CircleComponent | import("../../../scripting").BulletComponent | import("../../../scripting").GodrayComponent | import("../../../scripting").BirdComponent | import("../../components/birdstatic/birdstaticcomponent").BirdStaticComponent | import("../../components/grass/grasscomponent").GrassComponent | import("../../../scripting").ShadowFloorComponent | import("../../../scripting").DustComponent | import("../../components/impact/impactcomponent").ImpactComponent | import("../../components/destination/destinationcomponent").DestinationComponent | import("../../components/interaction/interactioncomponent").InteractionComponent | import("../../components/scatter/scattercomponent").ScatterComponent | import("../../components/scattermesh/scattermeshcomponent").ScatterMeshComponent | import("../../components/instancedmesh/instancedmeshcomponent").InstancedMeshComponent | import("../../components/portal/portalcomponent").PortalComponent | import("../../components/spline/splinecomponent").SplineComponent | import("../../components/cache/cachecomponent").CacheComponent | import("../../components/agora/component").AgoraComponent | import("../../components/batch/batchcomponent").BatchComponent | import("../../components/group/groupcomponent").GroupComponent>;

Parameters

Parameter

Type

Description

opts

{ parent?: Component3D; abort?: AbortSignal; }

**Returns:**

Promise<import("../../../scripting").ModelComponent | import("../../../scripting").AudioComponent | import("../../components/dialog/dialogcomponent").DialogComponent | import("../../components/iframe/iframecomponent").IframeComponent | import("../../../scripting").VideoComponent | import("../../../scripting").TerrainComponent | import("../../../scripting").EnvmapComponent | import("../../../scripting").BackgroundComponent | import("../../../scripting").LightingComponent | import("../../../scripting").TextComponent | import("../../../scripting").FogComponent | import("../../components/camera/cameracomponent").CameraComponent | import("../../../scripting").MeshComponent | import("../../../scripting").ImageComponent | import("../../../scripting").WaterComponent | import("../../../scripting").PostProcessingComponent | import("../../../scripting").ReflectorComponent | import("../../../scripting").RainComponent | import("../../../scripting").SpawnComponent | import("../../components/vrmanims/vrmanimscomponent").VRMAnimsComponent | import("../../../scripting").WindComponent | import("../../../scripting").KitBashComponent | import("../../../scripting").AvatarComponent | import("../../../scripting").MagneticFieldComponent | import("../../../scripting").PlatformComponent | import("../../../scripting").CloudComponent | import("../../components/circle/circlecomponent").CircleComponent | import("../../../scripting").BulletComponent | import("../../../scripting").GodrayComponent | import("../../../scripting").BirdComponent | import("../../components/birdstatic/birdstaticcomponent").BirdStaticComponent | import("../../components/grass/grasscomponent").GrassComponent | import("../../../scripting").ShadowFloorComponent | import("../../../scripting").DustComponent | import("../../components/impact/impactcomponent").ImpactComponent | import("../../components/destination/destinationcomponent").DestinationComponent | import("../../components/interaction/interactioncomponent").InteractionComponent | import("../../components/scatter/scattercomponent").ScatterComponent | import("../../components/scattermesh/scattermeshcomponent").ScatterMeshComponent | import("../../components/instancedmesh/instancedmeshcomponent").InstancedMeshComponent | import("../../components/portal/portalcomponent").PortalComponent | import("../../components/spline/splinecomponent").SplineComponent | import("../../components/cache/cachecomponent").CacheComponent | import("../../components/agora/component").AgoraComponent | import("../../components/batch/batchcomponent").BatchComponent | import("../../components/group/groupcomponent").GroupComponent>