コード例 #1
0
 protected override void Init()
 {
     if (this.m_Type == null)
     {
         if (ShapeModuleUI.s_Texts == null)
         {
             ShapeModuleUI.s_Texts = new ShapeModuleUI.Texts();
         }
         this.m_Type                     = base.GetProperty("type");
         this.m_Radius                   = ShapeModuleUI.MultiModeParameter.GetProperty(this, "radius", ShapeModuleUI.s_RadiusTexts.speed);
         this.m_RadiusThickness          = base.GetProperty("radiusThickness");
         this.m_Angle                    = base.GetProperty("angle");
         this.m_Length                   = base.GetProperty("length");
         this.m_BoxThickness             = base.GetProperty("boxThickness");
         this.m_Arc                      = ShapeModuleUI.MultiModeParameter.GetProperty(this, "arc", ShapeModuleUI.s_ArcTexts.speed);
         this.m_DonutRadius              = base.GetProperty("donutRadius");
         this.m_PlacementMode            = base.GetProperty("placementMode");
         this.m_Mesh                     = base.GetProperty("m_Mesh");
         this.m_MeshRenderer             = base.GetProperty("m_MeshRenderer");
         this.m_SkinnedMeshRenderer      = base.GetProperty("m_SkinnedMeshRenderer");
         this.m_MeshMaterialIndex        = base.GetProperty("m_MeshMaterialIndex");
         this.m_UseMeshMaterialIndex     = base.GetProperty("m_UseMeshMaterialIndex");
         this.m_UseMeshColors            = base.GetProperty("m_UseMeshColors");
         this.m_MeshNormalOffset         = base.GetProperty("m_MeshNormalOffset");
         this.m_RandomDirectionAmount    = base.GetProperty("randomDirectionAmount");
         this.m_SphericalDirectionAmount = base.GetProperty("sphericalDirectionAmount");
         this.m_RandomPositionAmount     = base.GetProperty("randomPositionAmount");
         this.m_AlignToDirection         = base.GetProperty("alignToDirection");
         this.m_Position                 = base.GetProperty("m_Position");
         this.m_Scale                    = base.GetProperty("m_Scale");
         this.m_Rotation                 = base.GetProperty("m_Rotation");
         this.m_Material                 = (EditorGUIUtility.GetBuiltinExtraResource(typeof(Material), "Default-Material.mat") as Material);
     }
 }
コード例 #2
0
 protected override void Init()
 {
     if (this.m_Type == null)
     {
         if (ShapeModuleUI.s_Texts == null)
         {
             ShapeModuleUI.s_Texts = new ShapeModuleUI.Texts();
         }
         this.m_Type                         = base.GetProperty("type");
         this.m_Radius                       = ShapeModuleUI.MultiModeParameter.GetProperty(this, "radius", ShapeModuleUI.s_RadiusTexts.speed);
         this.m_RadiusThickness              = base.GetProperty("radiusThickness");
         this.m_Angle                        = base.GetProperty("angle");
         this.m_Length                       = base.GetProperty("length");
         this.m_BoxThickness                 = base.GetProperty("boxThickness");
         this.m_Arc                          = ShapeModuleUI.MultiModeParameter.GetProperty(this, "arc", ShapeModuleUI.s_ArcTexts.speed);
         this.m_DonutRadius                  = base.GetProperty("donutRadius");
         this.m_PlacementMode                = base.GetProperty("placementMode");
         this.m_Mesh                         = base.GetProperty("m_Mesh");
         this.m_MeshRenderer                 = base.GetProperty("m_MeshRenderer");
         this.m_SkinnedMeshRenderer          = base.GetProperty("m_SkinnedMeshRenderer");
         this.m_MeshMaterialIndex            = base.GetProperty("m_MeshMaterialIndex");
         this.m_UseMeshMaterialIndex         = base.GetProperty("m_UseMeshMaterialIndex");
         this.m_UseMeshColors                = base.GetProperty("m_UseMeshColors");
         this.m_MeshNormalOffset             = base.GetProperty("m_MeshNormalOffset");
         this.m_Texture                      = base.GetProperty("m_Texture");
         this.m_TextureClipChannel           = base.GetProperty("m_TextureClipChannel");
         this.m_TextureClipThreshold         = base.GetProperty("m_TextureClipThreshold");
         this.m_TextureColorAffectsParticles = base.GetProperty("m_TextureColorAffectsParticles");
         this.m_TextureAlphaAffectsParticles = base.GetProperty("m_TextureAlphaAffectsParticles");
         this.m_TextureBilinearFiltering     = base.GetProperty("m_TextureBilinearFiltering");
         this.m_TextureUVChannel             = base.GetProperty("m_TextureUVChannel");
         this.m_RandomDirectionAmount        = base.GetProperty("randomDirectionAmount");
         this.m_SphericalDirectionAmount     = base.GetProperty("sphericalDirectionAmount");
         this.m_RandomPositionAmount         = base.GetProperty("randomPositionAmount");
         this.m_AlignToDirection             = base.GetProperty("alignToDirection");
         this.m_Position                     = base.GetProperty("m_Position");
         this.m_Scale                        = base.GetProperty("m_Scale");
         this.m_Rotation                     = base.GetProperty("m_Rotation");
         if (!ShapeModuleUI.s_Material)
         {
             ShapeModuleUI.s_Material = (EditorGUIUtility.GetBuiltinExtraResource(typeof(Material), "Default-Material.mat") as Material);
         }
         if (!ShapeModuleUI.s_TextureMaterial)
         {
             ShapeModuleUI.s_TextureMaterial = new Material((Shader)EditorGUIUtility.Load("SceneView/ParticleShapeGizmo.shader"));
         }
         if (!ShapeModuleUI.s_SphereTextureMaterial)
         {
             ShapeModuleUI.s_SphereTextureMaterial = new Material((Shader)EditorGUIUtility.Load("SceneView/ParticleShapeGizmoSphere.shader"));
         }
         if (!ShapeModuleUI.s_CircleMesh)
         {
             ShapeModuleUI.s_CircleMesh = ((GameObject)EditorGUIUtility.Load("SceneView/Circle.fbx")).transform.GetComponent <MeshFilter>().sharedMesh;
         }
         if (!ShapeModuleUI.s_QuadMesh)
         {
             ShapeModuleUI.s_QuadMesh = (Resources.GetBuiltinResource(typeof(Mesh), "Quad.fbx") as Mesh);
         }
         if (!ShapeModuleUI.s_SphereMesh)
         {
             ShapeModuleUI.s_SphereMesh = (Resources.GetBuiltinResource(typeof(Mesh), "New-Sphere.fbx") as Mesh);
         }
         if (!ShapeModuleUI.s_HemisphereMesh)
         {
             ShapeModuleUI.s_HemisphereMesh = ((GameObject)EditorGUIUtility.Load("SceneView/Hemisphere.fbx")).transform.GetComponent <MeshFilter>().sharedMesh;
         }
     }
 }