I am considering buying an imac in order to install unity3d (I don’t feel like waiting till unity 2.5 is released for PC). I am looking around the documentation, reviews, forum and the tutorials trying to get a feel if I should spend the 1.5K for the imac. So far so good. I am a little worried about the java script though and how much you can do with it. For example, say I want to create a floor with 400 tiles (20x20). Can I create the boxes through java script?
normally I would want to write something like:
private final Box[][] tile = new Box[20][20];
for(int i = 0; i < 20; i++){
for(int j = 0; j < 20;j++){
tile[i][j] = new Box("tile"+i+j,new Vector3f(),1,0.25f,1);
tile[i][j].getLocalTranslation().set(2*i, 0, 2*j);
}
I know js doesn’t support multi-dimensional arrays directly but can I create/destroy unity objects through script? Example of this?
sorry but I couldn’t find an answer to this.
thanks vm
Or to flex Unity’s muscle a bit better, check the docs and read up on using Instantiate in combination with prefabs. You make prefabs at author time (can be a model, a model with scripts, a model with scripts and animations, etc.), then you instantiate that at run-time using, well, Instantiate. Very powerful stuff.
Great! You guys convinced me! I have unity running now and another noobish question:
How do I change the number of Triangles (and Vertices) of a plane?
I want my plane to be a simple quad built with 2 triangles and 4 vertices. When I add a plane it’s drawn with 200 triangles though and I haven’t been able to figure out how to change this?
Unity is not nor do we want it to be a modeling tool, as such it offers you a basic plane primitive and a raw mesh class if you want to build on the fly. If you need a modeling tool then look into Blender (free) or something like Cheetah 3D ($149), inexpensive and well integrated with Unity.
So far the most difficult part is actually purchasing Unity3d (with iPhone Basic). The payment system wouldn’t take my card so I had to pay using paypal. Does anyone have an idea how long it would take them to send me a code and a download link for the iPhone Basic?
I left a message and sent an e-mail but no reply yet. I was hoping to get it today so I can play with it during the long weekend
thanks
PS: I understand this post is quite off topic. Sorry, I will try not to do it again
Most credit card companies will automatically deny any purchase over X number of dollars from unknown merchants. Usually a five minute phone-call with your card company will fix it. Something along the lines of “Hi, I am Mr. Smith, I authorize payment to the merchant on that last blocked purchase.”
thanks for the reply. However I was stupid and used the paypal option. Unity has received my payment, but hasn’t sent me anything yet. Hopefully they will do it on Tuesday now since it’s already quite late…
If you used pay-by-check then it can take a few days to clear and only then will your license be generated and sent. I don’t see a license generated for you just yet, if you’re very time sensitive about this then drop me a line outside this thread (PM here on the forums or via email) and I’ll get you sorted with a trial license to use while you wait.
Sorry to be blunt but, why do you do it when you know it’s not proper etiquette? Don’t “try not to do it again”, just don’t do it. Thanks.