transform.Translate but Transform has Rotation!=0
Hi there! I was testing enemies movements in my wannabe game, and I've noticed a behaviour that I really don't like. Basically, I got a simple translation function that should move the enemies to a...
View ArticleCheck if Exists and if so, Add it to Other List
Hi there! I've just experienced an odd issue and I'd like to be enlightened on this topic. I'm posting a piece of code in which I'm inside a switch, but that's not so important; what matters is that **...
View ArticleUnity UI image + mask has jaggies
Hi there! The new layout for GUI in Unity is amazing **BUT**, as I was playing around with it, I've found out that one of my canvas' images is rendered with jaggies and I know it shouldn't have them....
View ArticleUI RectTransform Position && Screen Resolution
Hi there! I've noticed that the cloned UI images that I instantiate at runtime are misplaced. ***Here's what I have*** I've got Prefabs that are instantiated via script at runtime at a specific...
View ArticleStateMachineBehaviour + StartCoroutine()
Hi there! I'd like to know, if it's possible, how to StartCoroutine() inside a StateMachineBehaviour script. I've tried the following: IEnumerator WaitSomeThenResetStuff (Animator anim){ yield return...
View Article" Binary Save" Stuff - Workaround for Vector3 Serialization
Hi there! I'm editing my original question because I was just looking at the tip of the iceberg and thus formulated a too much open/broad/generic question two days ago. I'm using procedural generation...
View ArticleCursor " Hide" is not Immediate, what's wrong?
Hi pals! I was browsing Scripting APIs to find the method to hide the mouse cursor/pointer, and found the deprecated one with Screen. A note pointed me to the updated method, which is Cursor.visible =...
View ArticleUsing Animator, How To Play an Animation Backwards
Hi there! My question is simple: - I've tried setting the Animator's speed to -1 and failed; - I've tried setting Animation's speed to -1 and found out Animation has no speed parameter; - I've tried to...
View ArticleUnity Build nullReference, but editor sees through it!
Hi there, sorry to bother but this kind of errors are new to me because I've been coding mainly inside the editor! It seems that 1 line in my Awake() returns != null when in editor, and == null once...
View ArticleStandalone build fails Application.LoadLevel() and Freezes
Hi there again! I've tracked down another bug of a line that worked fine in editor and, for some reason, it does it wrong in the build. Here's the chunk of code from the scene named...
View ArticleStatic classes and references are bad for Builds... Alternatives?
Hi there! Yeah... that sucks... I've just found out that most of the problems I've been experiencing lately with my builds are related to static classes and references. Well, static classes most often...
View ArticleMore True Randomess - RNGCryptoServiceProvider explanation required
Hay there, it's been a while but now I have a new Question!!! :D I wrote some code that needed randomness and then checked the results "UnityEngine.Random()" was returning . I didn't liked the way it...
View Article