Ejemplo n.º 1
0
    private IEnumerator _BakeObjectRealTime(BakeProcess process)
    {
        while (!pathfindable)
        {
            yield return(null);
        }

        GameObject g = process.obj;

        while (true)
        {
            //bake again
            process.busy = true;

            foreach (Node node in process.bakeable.myNodes)
            {
                node.filled = false;
            }

            StartCoroutine(BakeObject(g, process.bakeable.bakeType));

            while (process.busy)
            {
                yield return(null);
            }

            yield return(new WaitForSeconds(process.bakeable.refreshSpeed));
        }
    }
Ejemplo n.º 2
0
    public void BakeObjectRealTime(Pathfinding_Bakeable _bakeable)
    {
        BakeProcess bP = new BakeProcess(_bakeable);

        realtimeBake.Add(bP);
        StartCoroutine(_BakeObjectRealTime(bP));
    }