Exemplo n.º 1
0
 /// <summary>
 /// Loads a resource at the specified path. If resource is already loaded an existing instance is returned.
 /// </summary>
 /// <remarks>
 /// If running outside of the editor you must make sure to mark that the resource gets included in the build. If
 /// running inside the editor this has similar functionality as if loading using the project library.
 /// </remarks>
 /// <typeparam name="T">Type of the resource.</typeparam>
 /// <param name="path">Path of the resource, relative to game directory. If running from editor this will be
 ///                    relative to the project library. If a sub-resource within a file is needed, append the name
 ///                    of the subresource to the path (for example mymesh.fbx/my_animation).</param>
 /// <param name="flags">Flags used to control the load process.</param>
 /// <returns>Loaded resource, or null if resource cannot be found.</returns>
 public static T Load <T>(string path, ResourceLoadFlag flags = ResourceLoadFlag.Default) where T : Resource
 {
     return((T)Internal_Load(path, flags));
 }
Exemplo n.º 2
0
 private static extern RRefBase Internal_LoadAsyncFromUUID(ref UUID uuid, ResourceLoadFlag flags);
Exemplo n.º 3
0
 private static extern Resource Internal_LoadFromUUID(ref UUID uuid, ResourceLoadFlag flags);
Exemplo n.º 4
0
 private static extern RRefBase Internal_LoadAsync(string path, ResourceLoadFlag flags);
Exemplo n.º 5
0
 private static extern Resource Internal_Load(string path, ResourceLoadFlag flags);