Slow down in the same time over different distances
Hi, I'm trying to slow down a object over different distances in the same time, say 3 seconds. My slow down code is. function lerpSpeed (speed: float, lerpSpeedTime: float) { incomingFlightSpeed =...
View ArticleErrors in Xcode 8.1
I've just updated Xcode to 8.1 and now when I build to iOS I get errors that I never had before. I'm using Unity and Xcode. The error is .....
View ArticleOnBecameVisible() .. GetComponent(ScriptName)
Hi, I have a simple script (below) that I attach to EVERY enemy in the game to tell me if they are visible or not, the script is attached to each of the LOD renderer on each enemy. My problem is...
View ArticleDivide volume depending on chosen amount.
Hi, I'm a bit stuck and could do with some help please, I've put together a script to find the bounds of a prefab that helps me place light probes but what I'd like to do is if I ask for 2, 3 or 4...
View ArticleAnyone brought from TurboSquid?
Hi, Has anyone purchased any models from TurboSquid and used them in Unity? The reason I ask is on their site it states included formats on the right, 3DS, OBJ, Autodesk FBX .. ect but I've noticed the...
View ArticleVector3.Angle()
Hi, I'm trying to get the angle like below. ![alt text][1] But in 3D space not on the same level, I thought this would do it. function angleToPlayer() : float { targetDir = player.position -...
View ArticleGet current state of blend tree ?
Hi, Ok I can check to see if a animation is playing in a sub state machine like below. private var idleState = Animator.StringToHash("Locomotion.Idle"); function Start (){ _anim = GetComponent.(); }...
View ArticleSet a variable to a collider type.
I'm trying to set a variable to a collider type. When a particle hits an enemy I want it to see what type of collider it has just hit, box, capsule or sphere . I thought something like this would work...
View ArticleGUI texture and 2D Texture rotate oposite directions
Hi, I'm trying to make a GUI weapon wheel, but why with my below code does the GUI texture draw from the middle right up and around anticlockwise, and the 2D weapon textures draw from the right middle...
View ArticleChange UI GUI Image Sprite at runtime .. Unity 5 .. js
Hi, I'm trying to swap a image sprite of a UI GUI but it's not swapping, what is wrong with my code ? .. I'm getting no errors. Thanks. #pragma strict import UnityEngine.UI; private var GUIweaponSprite...
View ArticleUnityEngine.EventSystems.. Trying to figure it out .js
Hi, I'm just starting to use the new UI GUI and are converting my scripts to use the new UI. I've converted a C# script off the internet to .js (form [HERE][1]) but it does not do what I'd expected .....
View ArticleCrossPlatformInputManager not inisalizing ..
Hi, I'm trying to use the CrossPlatformInputManager in some javascript, the problem is that when called I'm getting no inputs being registered. The sample code below is what I'm testing with in the...
View ArticleThe type or namespace name `UnityEditor' could not be found
Hi, I'm using the below CrossPlatformInputInitialize.cs script and when trying to build to iOS I get the following errors, how can I correct these errors? .. Thanks....
View ArticleXcode build error ..
Hi, When trying to build to iOS with Xcode as it builds to the phone then starts to run I get the below error. Does anyone know what this means please? ![alt text][1] [1]:...
View ArticleTrying to access SceneManagement
Hi, I'm trying to access SceneManagement in Unity 5.2.3f1 but keep getting the error Assets/Scripts/0-Player/StartMenu.js(4,8): BCE0021: Namespace 'UnityEngine.SceneManagement' not found, maybe you...
View ArticleTrying to get the progress of a loading scene in Unity 5.3.1
Hi, I'm trying to get the progress of a loading scene in Unity 5.3.1, below is the snippet of code I'm using but all the progress prints out is in the picture below .. The scene loads and the line...
View ArticleThe file MemoryStream is corrupted! Remove it and launch unity again
Hi, Ive updated Unity from 5.2 to 5.3.1f1 yesterday and was using it with no problem then saved my scene and project and now have just opened the project again and when I went to play it I got the...
View ArticleClamp UI Image to Canvas
Hi, I'm trying to clamp a UI Image that tracks incoming objects to the canvas but I'm having trouble doing it, I tracks them but then goes out of view with the object, my canvas render mode is Screen...
View ArticleOverride animation in LateUpdate()
Hi, I want to make a Mech's head look at the player, the Mech is animated so to use .. transform.LookAt (_player.transform.position); in LateUpdate() works fine but I want to slowly rotate it to it's...
View ArticleDelete some unused tags and game objects tag changes unity 5
Hi, I've noticed if I delete any unused tags then and game objects in the scene with tags below the deleted ones change to whatever has moved into that position ? Should it do that? I'm sure it didn't...
View Article