Exemple #1
0
        public static UObject NewImmortalObject(Type type, string name, string moduleName)
        {
            UObject o = NewObject(type, name);

            if (o != null)
            {
                UGlobalObject.Get().AddGlobalObject(o, moduleName);
                return(o);
            }
            return(null);
        }
Exemple #2
0
        public static UGlobalObject Get()
        {
            if (msGlobalObject == null)
            {
                msGlobalObject = NewObject <UGlobalObject>("GlobalObject");
                if (msGlobalObject != null)
                {
                    DontDestroyOnLoad(msGlobalObject.gameObject);
                }
            }

            return(msGlobalObject);
        }
Exemple #3
0
 public UObject AsImmortal(string moduleName)
 {
     return(UGlobalObject.Get().AddGlobalObject(this, moduleName));
 }