Open lazlo-bonin opened 8 years ago
I'm having trouble reproducing when I convert the code so I can compile it. This is what I tested with:
using FullInspector;
using UnityEngine;
[CreateAssetMenu]
public class Propagation : BaseScriptableObject {
public MovieTexture source { get; set; }
public int startFrame = 0;
public int endFrame = 100;
//public Channel visibilityChannel { get; set; } = Channel.RGB;
//public Chroma visibilityChroma { get; set; } = Chroma.Black;
public bool enforcePurity { get; set; }
[InspectorRange(2, 14)]
public int sampleCount = 14;
public Texture2D[] maps = new Texture2D[0];
[InspectorRange(0, 2)]
public float intensity = 1;
[InspectorRange(0, 1)]
public float edgelessVisibility = 1;
}
using FullInspector;
using UnityEngine;
public class Repository : BaseBehavior {
//public static Repository instance => Singleton<Repository>.instance;
//public static bool instantiated => Singleton<Repository>.instantiated;
public Mesh cubeMesh { get; private set; }
public int a;
//public Photo photo { get; private set; }
//public AudioSourcePoolable audioSource { get; private set; }
//public VisibilityCubeDecal timedCube { get; private set; }
//public VisibilityCuboidDecal timedCuboid { get; private set; }
//public FootstepBank footsteps { get; private set; }
public Propagation[] propagations;
public Repository() {
}
}
Would you mind verifying this still reproduces with this code, or send up updated code that demonstrates the issue?
Thanks!
I have a scriptable object type using the following inheritance hierarchy:
Propagation : EphemeresScriptableObject : BaseSriptableObject
I reference it as a property of a scene behaviour that uses the following inheritance hierarchy:
Repository : EphemeresBehaviour : BaseBehavior
The property is a
Propagation[]
(array). The same problem occurs if it's aList<Propagation>
.Upon deserialization, I get the following error and cannot assign elements in the list (selecting a
Propagation
object does not assign it to the object field, which stays at "None").Here is the full code for
Repository
:Here is the full code for
Propagation
:(Using C# 6.0 for Unity, which explains the property initializers).