Example #1
0
        public System.IObservable <T> LoadAssetByPath <T>(string path, Action <IAsyncOperation <T> > onCompleted = null)
            where T : UnityEngine.Object
        {
            var fullPath = $"{_prefabPrefix}{path}{_prefabSuffix}";

            return(ObservableAddressables.LoadAsset <T>(fullPath, onCompleted));
        }
Example #2
0
        // ---------------------------------
#if USE_ADDRESSABLE
        public System.IObservable <IList <T> > LoadAssets <T>(object key, Transform parentTran,
                                                              Action <UnityEngine.ResourceManagement.IAsyncOperation <T> > onSingleCompleted = null,
                                                              Action <IAsyncOperation <IList <T> > > onCompleted = null)
            where T : UnityEngine.Object
        {
            return(ObservableAddressables.LoadAssets <T>(key, onSingleCompleted, onCompleted));
        }
Example #3
0
        public System.IObservable <T> InstantiatePrefabByPath <T>(string path, Transform parentTran,
                                                                  Action <IAsyncOperation <T> > onCompleted = null,
                                                                  bool isWorldSpace = false)
            where T : UnityEngine.Object
        {
            var fullPath = $"{_prefabPrefix}{path}";

            return(ObservableAddressables.Instantiate <T>(fullPath, parentTran, onCompleted, isWorldSpace));
        }
Example #4
0
 public System.IObservable <T> LoadAsset <T>(object key, Action <IAsyncOperation <T> > onCompleted = null)
     where T : UnityEngine.Object
 {
     return(ObservableAddressables.LoadAsset <T>(key, onCompleted));
 }
Example #5
0
 public System.IObservable <T> Instantiate <T>(object key, Transform parentTran, Action <IAsyncOperation <T> > onCompleted = null, bool isWorldSpace = false)
     where T : UnityEngine.Object
 {
     return(ObservableAddressables.Instantiate <T>(key, parentTran, onCompleted, isWorldSpace));;
 }