Esempio n. 1
0
        public override void OnEnable()
        {
            base.OnEnable();
            cloth = (ObiTearableCloth)target;

            particlePropertyNames.AddRange(new string[] { "Tear Resistance" });
        }
Esempio n. 2
0
        public override void OnEnable()
        {
            base.OnEnable();
            cloth = (ObiTearableCloth)target;

            particlePropertyNames.AddRange(new string[] { "Tear Resistance" });

            // show wireframe
            EditorUtility.SetSelectedWireframeHidden(cloth.GetComponent <Renderer>(), false);
        }
Esempio n. 3
0
        static void CreateObiClothWithSolver()
        {
            GameObject c = new GameObject("Obi Tearable Cloth");

            Undo.RegisterCreatedObjectUndo(c, "Create Obi Tearable Cloth");
            c.AddComponent <MeshFilter>();
            c.AddComponent <MeshRenderer>();
            ObiTearableCloth cloth  = c.AddComponent <ObiTearableCloth>();
            ObiSolver        solver = c.AddComponent <ObiSolver>();

            cloth.Solver = solver;
        }