- Home /
OnMouseOver still works on disabled script
is this normal?
I disabled script
using UnityEngine;
using System.Collections;
public class PickUpObject : MonoBehaviour {
void OnMouseOver () {
Debug.Log("asdf");
}
}
but when I mouse over the object I still get it working is this normal?
I ran a quick test, and it is true for me. Good to know.
yeah I did a fail safe if they manage to repair it that I will still work as I want if they repair it
with
void On$$anonymous$$ouseOver () {
if (this.enabled){
}
}
I have been facing issues with disabled scripts. For instance, I had a disabled BaseClass and a class inheriting from BaseClass and weirdly the behaviours were wrong. once I remove the BaseClass script then it works fine. $$anonymous$$mm, may sound like a bug or just a conflict...
read the post please
IF the object has this script and if the script is disabled On$$anonymous$$ouseOver still works how would this object not have this script if still works ?!?!???!?
I would downvote our answer but since you guys can't go below 0 anylonger so you can be happy
Answer by sdgd · Oct 19, 2013 at 02:45 PM
through the time I've been programming I learned that it's just a conflict like @fafase thought
well if you make a script without any Update or FixedUpdate or LateUpdate or Start or Awake it'll always be "disabled" but it's not really disabled script it's just not updating everything else still works
so it is impossible to disable a script EXCEPT for disabling the every frame change stuff, ...
all other events will still work