Hello
I am creating spot generator using editor script and every thing is working super fine , but after I change some code and wait for compilation to finish the values resetting it self.
To be more accurate the values that are resetting are in translation and rotation in BuildVolumeSpots module. here is code how i change them
I tried set dirt as as group, and i did single one and tested it but it always resetting values after compilation.
volumeSpot.Dirty = true;
EditorUtility.SetDirty(volumeSpot);
EditorUtility.SetDirty(environmentGenerator);//Generator that contains volumeSpot
I added bellow image of Debug Inspector on one of volume spot module
I am using Oadin inspector and i function that create the generator is on MonoBehaviour script using button to run it . Every thing is working perfect when I create the generator until code compilation then values get reset.
I am creating spot generator using editor script and every thing is working super fine , but after I change some code and wait for compilation to finish the values resetting it self.
To be more accurate the values that are resetting are in translation and rotation in BuildVolumeSpots module. here is code how i change them
Code:
volumeSpot.Groups[0].TranslationX = new FloatRegion(0,0);
volumeSpot.Groups[0].TranslationY = new FloatRegion(0,0);
volumeSpot.Groups[0].TranslationZ = new FloatRegion(0,-4);
volumeSpot.Groups[0].RotationX = new FloatRegion(0,0);
volumeSpot.Groups[0].RotationY = new FloatRegion(0,90);
volumeSpot.Groups[0].RotationZ = new FloatRegion(0,0);
I tried set dirt as as group, and i did single one and tested it but it always resetting values after compilation.
volumeSpot.Dirty = true;
EditorUtility.SetDirty(volumeSpot);
EditorUtility.SetDirty(environmentGenerator);//Generator that contains volumeSpot
I added bellow image of Debug Inspector on one of volume spot module
I am using Oadin inspector and i function that create the generator is on MonoBehaviour script using button to run it . Every thing is working perfect when I create the generator until code compilation then values get reset.