Answers for "unity3d how to add a component in code"

C#
0

c# addcomponent

// Consider an existing GameObject, gameObj
Rigidbody addedComp = gameObj.AddComponent<Rigidbody>() as Rigidbody;
// You can also add custom components by class name
Posted by: Guest on September-01-2020

C# Answers by Framework

Browse Popular Code Answers by Language