Can't move camera when scipt's attached to chosen gameobject
Hi guys, I've made script for custom object painting and of course I had to create empty script just with class and monobehaviour to be able to paint. But when I choose in hierarchy object that has this script I can't use camera :/ It can't move in any direction... But when I click on object that doesnt have this script (or just air) everything is okay.
Any solutions?
P.S Is it possible to make custom objects painting window without needing object with that empty script? Because if I choose object that has that script I'm able to paint on another ones that doesnt have that script...
Thanks for all help!
Answer by PROE_ · Mar 28, 2017 at 09:11 PM
Okay... Localized where's problem.
When I claim this EditorWindow line I can move my camera... :/
public ProMousePlacementWindow pmpw;
public void OnSceneGUI()
{
pmpw = EditorWindow.GetWindow<ProMousePlacementWindow>(); // This line is a problem but I have to get access to this window or access from window to script but don't know how
... other stuff
}
Can somebody help?
// SOLVED // solution:
So basically to repair that I just need to put
pmpw = EditorWindow.GetWindow();
to Awake function...
Your answer
Follow this Question
Related Questions
Weird Rendering Unity5 1 Answer
uNet hitboxes and movement. 0 Answers
Vr Camera position conflict 0 Answers
Hello.I use the Region Capture to create the coloring of augmented reality. 0 Answers
how to make forward relative to the view of the camera 0 Answers