[Unity3D] Beginner Help please
#1
Posted 11 August 2012 - 05:15 PM
I am already a pretty good coder in quite a few languages but the actual unity3D program confuses me. Can someone point me in the right direction for learning how to add things to the unity and code things in etc?
It would be much appreciated.
#2
Posted 14 August 2012 - 11:58 AM
I heavily recommend reading up on c#, it is a bit more advanced than the unityscript, but its 99.5% the same as proper c#, so you get skills in that language while using it.
The philosophy of unity is that its component-based. You need a minimum of one script added to a gameobject in unity to be able to get anything running.
Here's a basic hierarchy of existent classes(link to the whole list):
Object(mother-object, most if not all classes inherit from this class, not very often used directly)
-Gameobject(Physical objects, at minimum contains a transform node for position, rotation, scale. Can be adjusted by adding components like Mesh for 3d and collision and rigidbodies for dynamics. you usually need at least one to add code to a scene)
- Component(mother-class of components, not used directly)
-- Monobehaviour(The standard class, child of component. You rarely can't go wrong with this one)
Those are the very barebones you'd need to create something that interacts with code.
You will want to start with Monobehaviour. once you've made a class with Monobehavior, you can click and drag it onto a gameobject. then it should be applied like a component and show up in the inspector. A Monobehavior class assumes the gameobject its attached to is its root, so if you write "transform.position=new Vector3(0,0,0);", you are more or less writing "thisGameObjThatTheComponentIsStuckTo.transform.position=new Vector3(0,0,0);". "this.transform..." works as well.
However, the problem with Monobehavior is that you can't create them through code with "MonoClass classReference = new MonoClass();". you need to do it this way:
MonoClass classReference; this.AddComponent<MonoClass>(); classReference= this.GetComponent<MonoClass>(); classReference.callFunction();
Anyway, I think for 14 minutes of work this is a rough start, I'll tell you more if you have questions.
edit: also, a very good resource for beginners in unity is http://www.unity3dstudent.com/. Very good videos for how things connect.
Edited by duke_Qa, 14 August 2012 - 12:27 PM.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#3
Posted 15 August 2012 - 01:16 AM
i dropped making it and started making the same thing but with counter strike weapons which requires modelings and a bit of animating so erm. ya..
you can download the zombie island game here:
http://www.gamefront... Island 1.0.rar
#4
Posted 15 August 2012 - 07:10 AM
Just ask if there's anything you need help with, I'm no expert but I've probably seen something akin to it.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#5
Posted 16 August 2012 - 05:30 AM
#6
Posted 16 August 2012 - 05:36 AM
Remember that all worlds draw to an end and that noble death is a treasure which no one is too poor to buy. - C.S. Lewis
There will come a time when you believe everything is finished. That will be the beginning. - Louis L'Amour
What will matter then will be people. If relationships will matter most then, shouldn't they matter most now? - Max Lucado
#7
Posted 16 August 2012 - 04:27 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users