Quantcast
Channel: Answers by "Mike 3"
Browsing all 60 articles
Browse latest View live
↧

Answer by Mike 3

Built in arrays don't have .Add, UnityEngine.Array does, as do List and ArrayList Your best bet is to use List really: import System.Collections.Generic; public var struc : List.; Then you can use...

View Article


Answer by Mike 3

That's generally because the host you're using hasn't allowed the .unity3d MIME type, so gets blocked What you will probably need to do is send an email to the system administrator asking them to add...

View Article


Answer by Mike 3

There isn't any built in synchronization between user threads and the unity thread. The main issue is a more to do with timing of events rather than the usual synchronization of data issue. The way...

View Article

Answer by Mike 3

I don't think you can - there's no cast operator I would honestly skip on using Array, it's untyped and will cause a fairly large amount of garbage when boxing/unboxing your ints Instead, use a List.,...

View Article

Answer by Mike 3

No - Unity is an application done mainly in c++, can't work really, it's not an sdk alone

View Article


Answer by Mike 3

You're trying to use the javascript syntax in c# What you need to do is use the generic version: GetComponent().enabled = false The alternative is to use the type version (which you shouldn't really...

View Article

Answer by Mike 3

You can use the % operator to do it if (val % 3 == 0) { //val is a multiple of 3, or 0 }

View Article

Answer by Mike 3

It's intentionally undefined, it can (and has) change between different versions of unity, depending on how they order the scene graph. Another thing you have to be careful of is that it could very...

View Article


Answer by Mike 3

simply: Debug.Log(transform.position); You don't need to use GetComponent with Transform, it's already got transform as a helper property

View Article


Answer by Mike 3

Change TestMaterial to material or sharedMaterial, depending what you're trying If there are multiple materials, you can also use materials to get the array of materials

View Article

Answer by Mike 3

Better yet, use var ETD_TextMesh = ETD.GetComponent.(); No need to type it as it's implicitly set to TextMesh, and there's no issues with it needing casting as it returns a TextMesh not a component

View Article

Answer by Mike 3

You just cast the return: GUISkin uiSkinResource = Resources.Load("UI_Skin") as GUISkin; or GUISkin uiSkinResource = (GUISkin)Resources.Load("UI_Skin");

View Article

Answer by Mike 3

You want to use the WWW class, documented here: http://unity3d.com/support/documentation/ScriptReference/WWW.html

View Article


Answer by Mike 3

You'll probably need const char* instead of std::string for the message and voice parameters in the native code

View Article

Answer by Mike 3

You're destroying the object which starts the coroutine, stopping it from running after the wait Change this line (both times): StartCoroutine(PONG.Goal(1)); to PONG.StartCoroutine(PONG.Goal(1)); So...

View Article


Answer by Mike 3

There's no official word there will be a linux editor or standalone player, but they have mentioned they'll make a linux compatible molehill based webplayer, no word on when that'll be done though

View Article

Answer by Mike 3

You should just be able to use GUI.Label (or GUILayout.Label) for it, changing the style on mouseover

View Article


Answer by Mike 3

You don't need to pay for them, no - everything which comes with Unity is licensed for you to use with your Unity games

View Article

Answer by Mike 3

In your code above, i is already the object you want to destroy the GameObject of, but you're then trying to use it as an index into the listBasically just use i instead, and probably name i better so...

View Article

Answer by Mike 3

You can set the z position on the Transform to set the depth the GUITexture will be rendered at

View Article
Browsing all 60 articles
Browse latest View live