|
i have a rocket that i create and there is a camera inside of it i want to be able to enable and disable that camera
(comments are locked)
|
|
If the camera is a child of bullit, you can access that component that way : (Edit : I usually program in C# but I try to write things in javascript here. But I mixed them both here, sorry about that !) can u put that in java please i dont know anything about c#
May 11 '12 at 03:48 AM
zeuo
I'm pretty sure java won't help you here, it's not a language that Unity supports. In any case, the syntax in Java is virtually the same as in C#... In any case, you should learn C#. It's not actually any more complex than UnityScript (your programs will still need to work the same way), and it is a generally more useful language (because it's not a unique JavaScript variant that is only used in one place).
May 11 '12 at 03:53 AM
syclamoth
i tryed the script but it dosnt work i want to disable the camera anyone know how
May 11 '12 at 03:56 AM
zeuo
Script Reference
May 11 '12 at 03:56 AM
Lo0NuhtiK
Or, do the smart thing, and buy all your programming assets from the Asset store. It's actually much cheaper than hiring someone to work for you constantly.
May 11 '12 at 04:00 AM
syclamoth
(comments are locked)
|
|
Code! To disable a camera that is the child of an object! In both UnityScript and C#! If you can't tell which is which, you need to do a little more homework. ty but i got Object reference not set to an instance of an object i have a camera inside of the rocket (which is being instanteated) called Camera so why isnt it working
May 11 '12 at 04:03 AM
zeuo
What have you set 'bullit' to? I'm assuming that 'bullit' is the newly instantiated object.
May 11 '12 at 02:18 PM
syclamoth
(comments are locked)
|
