Answers for "creating a prefab in unity"

C#
3

unity C# instantiate prefab

GameObject prefab = reference_to_your_prefab_asset;
Vector3 position = Vector3.zero;
Quaternion rotation = Quaternion.identity;
Transform parent = parent_of_instantiated_prefab;

Instantiate(prefab, position, rotation, parent);
Posted by: Guest on March-09-2021

C# Answers by Framework

Browse Popular Code Answers by Language