Ejemplo n.º 1
0
    public void RemoveCanvas()
    {
        if (canvas != null)
        {
            canvas.unload();
            canvas = null;
        }

        SafeRemoveAllChildren();
    }
Ejemplo n.º 2
0
    public void RemoveCanvas()
    {
        if (canvas != null)
        {
            canvas.PerformOnChildren(val => {
                MethodInfo method = val.GetType().GetMethod("gaxb_unload");
                if (method != null)
                {
                    method.Invoke(val, null);
                }
                return(true);
            });

            canvas.gaxb_unload();

            canvas.unload();

            DestroyImmediate(canvas.gameObject);
            canvas = null;
        }

        SafeRemoveAllChildren();
    }