Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

load prefab in script unity

/*
To use Resources.Load,
the object must be in a Resources folder.(there can be multiple).
So your folder structure could look like "Assets/Resources/Prefabs/prefabName"
Then to load it use*/
Resources.Load("Prefabs/prefabName") as GameObject;
Source by forum.unity.com #
 
PREVIOUS NEXT
Tagged: #load #prefab #script #unity
ADD COMMENT
Topic
Name
5+3 =