Exemple #1
0
 private void Start()
 {
     m_ResourceComponent = AshUnityEntry.Instance.GetComponent <ResourceComponent>();
     if (m_ResourceComponent == null)
     {
         Log.Fatal("Resource component is invalid.");
         return;
     }
 }
Exemple #2
0
        private void Start()
        {
            m_ResourceComponent = AshUnityEntry.Instance.GetComponent <ResourceComponent>();
            if (m_ResourceComponent == null)
            {
                Log.Fatal("Resource component is invalid.");
                return;
            }

            m_LocalizationManager = AshEntry.GetModule <ILocalizationManager>();
            if (m_LocalizationManager == null)
            {
                Log.Fatal("Localization manager is invalid.");
                return;
            }
        }
Exemple #3
0
        private void OnLowMemory()
        {
            Log.Info("Low memory reported...");

            ObjectPoolComponent objectPoolComponent = GetAshComponent <ObjectPoolComponent>();

            if (objectPoolComponent != null)
            {
                objectPoolComponent.ReleaseAllUnused();
            }

            ResourceComponent resourceCompoent = GetAshComponent <ResourceComponent>();

            if (resourceCompoent != null)
            {
                resourceCompoent.ForceUnloadUnusedAssets(true);
            }
        }