Beispiel #1
0
        public void Complete()
        {
            if (State == ModifierStart.Generating)
            {
                lastHandle.Complete();
                EndGeneration();

                State = ModifierStart.Initialized;
            }
            else
            {
                Debug.LogError("modifier can't complete, it wasn't generating");
            }

            DisposeTemps();
        }
Beispiel #2
0
        public JobHandle Start(MeshData meshData, JobHandle dependOn = default)
        {
            if (State == ModifierStart.Uninitialized)
            {
                Debug.LogError("modifier was not inited!");
                DisposeTemps();
                return(dependOn);
            }

            if (State == ModifierStart.Generating)
            {
                Debug.LogError("modifier is already generating!");
                DisposeTemps();
                return(dependOn);
            }

            lastHandle = StartGeneration(meshData, dependOn);
            State      = ModifierStart.Generating;

            JobHandle.ScheduleBatchedJobs();

            return(lastHandle);
        }
Beispiel #3
0
 protected void Inited()
 {
     State = ModifierStart.Initialized;
 }