It works great on editor, but I need it to work on my build. (UnityEditor.TransformUtils)
How do I use this code on Build?
RT = UnityEditor.TransformUtils.GetInspectorRotation(RT_objeto.transform).z;
I get this error when I try to build: The type or namespace name 'TransformUtils' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)
It works great on editor, but I need it to work on my build.
Reference: https://docs.unity3d.com/ScriptReference/TransformUtils.html
Thanks!
Answer by itisieric · Jan 19, 2020 at 04:43 AM
public float x;
public float y;
public float z;
x = (UnityEditor.TransformUtils.GetInspectorRotation(getRotation.transform).x) + offSetX1;
y = (UnityEditor.TransformUtils.GetInspectorRotation(getRotation.transform).y) + offSetY1;
z = (UnityEditor.TransformUtils.GetInspectorRotation(getRotation.transform).z) + offSetZ1;
//Debug.Log("x: " + x);
//Debug.Log("y: " + y);
//Debug.Log("z: " + z);
Answer by ugurberkecanunlu · Jul 23, 2020 at 08:08 PM
I have the same problem. when i move this script into editor script its not working on my game but i can build.
Answer by hsgaminators · Oct 29, 2021 at 12:33 PM
Facing the same problem. What's the point of a utility if it works only in editor and you have to deal with the Quaternion rubbish again.
Your answer
Follow this Question
Related Questions
compiler errors - empty console new empty scene! 0 Answers
I have no idea how to fix a "pragma strict error : unrecognized pragma directive" error. 1 Answer
Exclamation marks with NO comment 0 Answers
AnimatedPropertyUtility.cs' is a binary file instead of a text file When Im creating new project 1 Answer
I keep getting compiler errors on my code, please help. (C#) 1 Answer