Package net.risingworld.api.assets
Class AssetBundle
java.lang.Object
net.risingworld.api.assets.Asset
net.risingworld.api.assets.AssetBundle
An AssetBundle which was created in Unity. It's like a collection of multiple assets, e.g textures, sounds,
models etc. It's also possible to store prefabs with almost any Unity component in it (e.g particle effects, lights,
physical components etc).
If you want to include materials or custom shaders, make sure they're HDRP compatible.
See this link for more information: https://forum.rising-world.net/thread/12491-create-asset-bundles/
Please note: If you include shaders or effects made with VFX Graph, the asset bundle may no longer be compatible with a newer game version if we update the Unity version. Typically this only happens with major version updates, but that depends on Unity. If we update the Unity version, you will find that information in our changelog.
If you want to include materials or custom shaders, make sure they're HDRP compatible.
See this link for more information: https://forum.rising-world.net/thread/12491-create-asset-bundles/
Please note: If you include shaders or effects made with VFX Graph, the asset bundle may no longer be compatible with a newer game version if we update the Unity version. Typically this only happens with major version updates, but that depends on Unity. If we update the Unity version, you will find that information in our changelog.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.risingworld.api.assets.Asset
Asset.Source, Asset.Type
-
Field Summary
Fields inherited from class net.risingworld.api.assets.Asset
DEFAULT_EXTENSION
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Gets all asset names (including their paths) in the asset bundle.static AssetBundle
loadFromFile
(String file) Loads an asset bundle from a file on the hard drive.loadTextAsset
(String assetName) byte[]
loadTextAssetBytes
(String assetName) Methods inherited from class net.risingworld.api.assets.Asset
dispose, equals, getChecksum, getDependency, getExtension, getHandle, getPath, getSource, getType, hashCode, isDisposed
-
Method Details
-
loadFromFile
Loads an asset bundle from a file on the hard drive.- Parameters:
file
- the path to the asset bundle file on the harddrive.- Returns:
- a new asset bundle instance.
- Example: Load asset bundle "examplebundle.bundle" from plugin folder
-
getAllAssetNames
Gets all asset names (including their paths) in the asset bundle.- Returns:
- a new array containing all names of the assets stored in this asset bundle.
-
loadTextAssetBytes
-
loadTextAsset
-