i have a few fields in a class extending Resource:
[Export] public bool ShowDamageVisuals { get; set; } = true;
[Export] public string Id { get; set; }
[Export] public GradientTexture1D DetroyParticlesColor { get; set; }
[Export] public float DestroyParticlesScale { get; set; } = 1.0f;
Everything works fine, except for DetroyParticlesColor, which gets stuck as the colors of one of my resource instances.
I use that field here at _Ready, where ObstacleData is a saved resource with data:
breakingParticles = GetNode<GpuParticles2D>("BreakingParticles");
var mat = breakingParticles.ProcessMaterial as ParticleProcessMaterial;
mat.ColorInitialRamp = ObstacleData.DetroyParticlesColor;
breakingParticles.Scale *= ObstacleData.DestroyParticlesScale;
the scale is correct, the colors are not. currently all my particles are orange like a braziers particles.
I already tried to "Make Unique" for all fields, for this one field, no change. There are other reference type fields like texture and audiostreams, and those are all good too.
what am i missing here?