Example #1
0
    public void RemoveCanvas()
    {
        if (canvas != null)
        {
            canvas.unload();
            canvas = null;
        }

        SafeRemoveAllChildren();
    }
Example #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();
    }