Could someone maybe tell me how to generate a Box Collider with a specific size from a C# script. Since you can't new the Box Collider because its a Component how do you approach it?
May 26 '11 at 06:46 AM
You use gameObject.AddComponent() to add components.
You can change the size after its added.
May 26 '11 at 07:16 AM
May 26 '11 at 07:17 AM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: May 26 '11 at 06:46 AM
Seen: 1695 times
Last Updated: May 26 '11 at 07:17 AM
BoxCollider error with nothing wrong? C#
Assignig a game object from within the editor without using find
How do I have an EditorWindow save it's data inbetween opening and closing Unity? C#
sqlite in unity indie version C#
C# Number to binary
Help converting this to C# - a few issues
Losing power up bool value
invoking an active coroutine
WaitForSeconds in C# outside of start or awake
Is it possible to use Windows Form Application to develope user interface in Unity?