Exemplo n.º 1
0
        /// <summary>
        /// Synchronously load (if necessary) and return the asset object represented by this asset ptr
        /// </summary>
        public T LoadSynchronous()
        {
            UObject obj = softObject.Value;

            if (obj == null && IsPending)
            {
                obj = softObject.LoadSynchronous();
            }
            return(obj as T);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Synchronously load (if necessary) and return the asset object represented by this asset ptr
        /// </summary>
        public UClass LoadSynchronous()
        {
            UObject asset = softObject.Value;

            if (asset == null || IsPending)
            {
                asset = softObject.LoadSynchronous();
            }
            UClass unrealClass = asset as UClass;

            if (unrealClass == null || !unrealClass.IsChildOf <T>())
            {
                return(null);
            }
            return(unrealClass);
        }