Beispiel #1
0
        public static MonoBehaviourPropertyValue Read(UnsafeReader reader)
        {
            var type = reader.ReadInt32();

            switch (type)
            {
            case 0:
                return(MonoBehaviourReferenceValue.ReadFrom(reader));

            case 1:
                return(MonoBehaviourPrimitiveValue.ReadFrom(reader));

            default:
                throw new InvalidOperationException();
            }
        }