struct
ProjectLibraryUtility
Various helper methods for the purposes of project library.
Public
Methods
staticGetResourceName
Returns the name of the resource stored in the package.
- relativePath
- Path to the resource entry in the project library. Path is relative to the project library imported resources folder.
Returns: Name of the resource.
staticGetResourcePathInPackage
Returns the path of a resource within the package.
- relativePath
- Path to the resource entry in the project library. Path is relative to the project library imported resources folder.
Returns: Path of the resource inside the package (relative to the package root).
staticGetPackageName
Returns the name of the package based on project library entry path.
- relativePath
- Path to the entry in the project library. Path is relative to the project library imported resources folder.
Returns: Name of the package.
staticGetRelativePathToPackage
Returns the path to the package a project library entry is stored in.
- relativePath
- Path to the entry in the project library. Path is relative to the project library imported resources folder.
Returns: Relative path to the package. Path is relative to the project library imported resources folder.
staticGetRelativePathFromRelativePackagePath
Converts a relative path to a package into a relative project library entry path.
- relativePackagePath
- Path to the package. Path is relative to the project library imported resources folder.
Returns: Path to the project library entry. Path is relative to the project library imported resources folder.
staticGetVirtualPathPrefix
Returns the prefix that should be used when loading a resource via a virtual path.
- relativePath
- Path to the entry in the project library. Path is relative to the project library imported resources folder.
- isSynchronizedPackage
- Set to true if points to a synchronized package rather than a resource.
Returns: Virtual path prefix. Generally this includes the global project library virtual path prefix, followed by the relative path to the folder the resource is located in.
staticGetVirtualPath
Returns a virtual path that may be used for loading a resource at the provided project library path.
- relativePath
- Path to the resource entry in the project library. Path is relative to the project library imported resources folder.
Returns: Virtual path that may be used for loading the resource.
staticFindImportOptions
Attempts to a find import options for a resource at the specified path.
- relativePath
- Path to the entry to search. Relative to the project library imported resources folder.
Returns: Found entry, or null if not found.
staticFindImportOptions
Attempts to a find import options for a resource with the specified ID.
- resourceId
- ID of the resource to look up.
Returns: Found entry, or null if not found.
staticFindRelativePath
Attempts to find a project library path for a resource with the specified id.
- resourceId
- ID of the resource to look up.
Returns: Path of the resource, relative to the project library imported resources folder or empty string if not found.
staticGetSourceResourcePath
Returns an absolute physical source resource path associated with the project library entry at the provided location.
- relativePath
- Path relative to the project library imported resources folder.
Returns: Absolute physical path to the associated source resource, or empty path if none exists.
staticGeneratePreviewIcon
Generates a preview icon for the provided resource.
staticGeneratePreviewIconAndAddToPackage
Generates a preview icon for the provided resource and adds it to the package.
- resource
- Resource for which to generate the preview icon for.
- package
- Package into which to add the preview icon. Icon will be added to folder within the package specified by , and using the resource ID as the filename.
Returns: Generated preview icon, or null if not generated.
Private
Methods
staticRenderThreadGeneratePreviewPyramid
Generates a preview image for the provided resource.
Render thread only.
- input
- Resource to generate the preview for.
- output
- Pre-allocated texture with render-target usage, to which the preview image will be generated. to