Ejemplo n.º 1
0
        public ResourceHandle LoadSceneAsync <TObject>(string key, out AddressableAssetsLoader loader, Action <Scene> callback)
            where TObject : UnityEngine.Object
        {
            var handle = m_Loader.LoadSceneAsync <TObject>(key, callback);

            loader = m_Loader;
            return(handle);
        }
Ejemplo n.º 2
0
        // ----------------------------------------------------------------
        // Method
        // ----------------------------------------------------------------
        public ResourceHandle LoadAsync <TObject>(string key, out AddressableAssetsLoader loader)
            where TObject : UnityEngine.Object
        {
            // 既に読み込み済み
            if (m_ResourceMapList.ContainsKey(key))
            {
                loader = null;
                return(null);
            }

            var handle = m_Loader.LoadAsync <TObject>(key, (objs) => m_ResourceMapList.Add(key, objs.Select(v => v as UnityEngine.Object).ToList()));

            loader = m_Loader;
            return(handle);
        }