I’m sure there must be a reason for us not being able to predeclare object variables in behaviors, but it would be nice if the undeclared variables in those areas that can’t really have predeclared variables, weren’t underlñined as errors.
why?
well look at this:
I’m using an object variable instead of a condition or parameter because this behavior is attatched to a prefab on the scene, the children interact with this behavior via the object variable, they wouln’t be able to interact with the conditions or parameters because the behavior can’t be added to the parent in the prefab editor, only in the scene, so the behavior properties cant be used in the prefab event editor.
I could just ignore the red underlining but I’t sometimes happens that there is an actuall error in the code and I don’t see it because it gets mixed witht the fake error.
Thanks.
Edit, noticed that this only happens because the action to set a variables value regardless of their type doesn’t exist in the behaviour editor, even tho the action works any way, and the reason for it not being there probably being that you can’t predeclare variables in an extension.