Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spot Generator resetting some values after Script compilation
#1
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

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.


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Spot Generator resetting some values after Script compilation - by Mos Def - 05-14-2021, 01:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 4 Yesterday, 07:25 AM
Last Post: amutp
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 0 6 Yesterday, 03:23 AM
Last Post: _Aka_
  Adjust radius of generated mesh via script? Shackman 1 3 03-26-2024, 01:12 PM
Last Post: _Aka_
  Generating GO only on CPs in Generator GameDeveloperek4123 1 6 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: