11-12-2024, 05:17 PM
Hi
I'm creating a game which uses a series of extruded volumes for a ski slope. I've just duplicated one of these courses in order to make a modified version but I'm getting now a lot of errors about null references. I'm referencing the course sections with the following code:
In the editor the references appear to be there and pointing to the right game objects but when I run the game I get a lot of errors and in the debugger the underlying "slot" for the reference is null. I don't really know how these are serialized except that they are using some non-standard magic so I'm guessing that duplicating the old curves has left some bad data in the serialized object. Does anyone know if it's possible to fix this, or if there is a method for duplicating curves which will keep references like this intact?
I'm creating a game which uses a series of extruded volumes for a ski slope. I've just duplicated one of these courses in order to make a modified version but I'm getting now a lot of errors about null references. I'm referencing the course sections with the following code:
Code:
[CGDataReferenceSelector(typeof(CGVolume), Label = "Volume/Path_1"), SerializeField]
public CGDataReference Path_1 = new CGDataReference();
In the editor the references appear to be there and pointing to the right game objects but when I run the game I get a lot of errors and in the debugger the underlying "slot" for the reference is null. I don't really know how these are serialized except that they are using some non-standard magic so I'm guessing that duplicating the old curves has left some bad data in the serialized object. Does anyone know if it's possible to fix this, or if there is a method for duplicating curves which will keep references like this intact?