Quantcast
Channel: Answers by "Mike 3"
Browsing latest articles
Browse All 60 View Live

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


Answer by Mike 3

You should be able to use seconds.ToString("00") to pad it to two numbers

View Article

Answer by Mike 3

Very often if you're playing right before building, it'll lock the dlls, making it difficult to move them into the build.If that happens, just relaunch unity and build again, without hitting play

View Article

Answer by Mike 3

If you haven't got a camera, it'll generally just show junk (What is in the screen buffer at that time) in built clients - the editor clears the screen buffer so generally masks the problem. I would...

View Article


Answer by Mike 3

You just use the same y value for both vectors: var currentPosition = transform.position; currentPosition.y = leader.position.y; if ( Vector3.Distance( leader.position, currentPosition ) >= distance) {

View Article


Answer by Mike 3

Are you sure it's not an issue with having the Collapse button selected in the console? That'll allow one of each message to be printed, hiding the rest

View Article

Answer by Mike 3

As many games as you want, it's licensed per seat instead

View Article

Answer by Mike 3

In the case you linked, it's an enum, so something like: enum Mode { Spherical, Linear } for declaring the enum, then: var mode : Mode; for the variable declaration which will be shown in the inspector

View Article

Answer by Mike 3

It's nothing to do with Debug.Log - the issue is that Vector3.ToString() gives back a string with 1 decimal place accuracy (ToString being called on any non string object for you). What you could do is...

View Article


Answer by Mike 3

There's two copies of the script on the first person controller object, disable both of them (Get both with GetComponentsInChildren) and it should do what you want

View Article

Answer by Mike 3

Do you need to send the data as POST instead of GET? If not, you could skip on the WWWForm and just do new WWW(requestString) If you do, I guess you could add some (short) simple data into the form so...

View Article


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
Browsing latest articles
Browse All 60 View Live




Latest Images