Exemplo n.º 1
0
        void ReadProperty(string propertyPath, string propertyType, string value)
        {
            SerializedProperty property = SerializedObject.FindProperty(propertyPath);

            if (property == null)
            {
                Debug.LogWarning("LoadError " + propertyPath);
                return;
            }
            if (property.propertyType.ToString() != propertyType)
            {
                Debug.LogWarning("Load TypeError" + propertyPath + ":" + propertyType);
                return;
            }
            try
            {
                BinaryUtil.BinaryReadFromString(value, reader => ReadPropertyValue(property, reader));
            }
            catch (Exception e)
            {
                Debug.LogError(e.Message);
            }
        }