We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 571b2de commit 9ca7f6fCopy full SHA for 9ca7f6f
Assets/Scripts/Core/ClothmeshGeneration.cs
@@ -1,19 +1,18 @@
1
using UnityEngine;
2
using System.Collections.Generic;
3
4
-[RequireComponent(typeof(PhysicsController))]
5
public class ClothmeshGeneration : MonoBehaviour
6
{
7
public int detail = 10; //10 means the mesh will be a 10x10 square grid (200 triangles)
8
public float meshSize = 0.1f;
9
public float meshDamping = 0.5f;
10
11
- private List<Spring> edges;
12
- private List<Pointmass> vertices;
+ private List<Spring> edges = new List<Spring>();
+ private List<Pointmass> vertices = new List<Pointmass>();
13
14
private PhysicsController physicsController;
15
16
- void Start()
+ void Awake()
17
18
physicsController = GetComponent<PhysicsController>();
19
0 commit comments