示例#1
0
 private void OnValidate()
 {
     if (Application.isPlaying)
     {
         NBodyC.SetParams(gravConstant, blackHoleCombineDistance);
     }
 }
示例#2
0
    private IEnumerator Start()
    {
        NBodyC.SetParams(gravConstant, blackHoleCombineDistance);

        _trailMesh = new Mesh();
        _trailMesh.MarkDynamic();

        _trailPropertyBlock = new MaterialPropertyBlock();

        prevPos.Create();
        currPos.Create();
        nextPos.Create();

        prevPos.DiscardContents();
        currPos.DiscardContents();
        nextPos.DiscardContents();

        ResetSimulation();
        yield return(null);

        yield return(null);

        ResetSimulation();
    }