Exemplo n.º 1
0
        private void CreateNewProfile(Type type, SerializedProperty property)
        {
            GrassMaterialProfile profile = AssetsManager.CreateNewScriptableObjectOfType(type,
                                                                                         "Grass Material location",
                                                                                         AssetsManager.GetScenePath(property),
                                                                                         GrassMaterialAttribute.GetFileNameFromClassType(type),
                                                                                         "asset") as GrassMaterialProfile;

            if (null != profile)
            {
                property.objectReferenceValue = profile;
                property.serializedObject.ApplyModifiedProperties();
            }
        }
Exemplo n.º 2
0
        private void CreateNewProfile(SerializedProperty property)
        {
            GrassPostProcessProfile profile = AssetsManager.CreateNewScriptableObjectOfType <GrassPostProcessProfile>("Grass Post Process Profile location",
                                                                                                                      AssetsManager.GetScenePath(property),
                                                                                                                      "GrassPostProcessProfile",
                                                                                                                      "asset");

            if (null != profile)
            {
                property.objectReferenceValue = profile;
            }
        }