I am having problems with using self or ArticyGlobalVariables.Default.SelfObject in a custom method in a instruction property of an entity.
So I have entity with a custom template who happens to have instruction field.
In an object I have the following script
Temp._string = IfObjectiveCompleted("unoticed", "unoticed", "failed");
setProp(self, "LevelObjectiveAttributes._state",Temp._string);
The method is generating well and it is getting called but if I use self or ArticyGlobalVariables.Default.SelfObject to reference the entity it is always null.
This is how I am calling the script in c#
entityAttributes.UpdateDescription.CallScript( scriptMethodProvider);
Am I doing something wrong?