Klasse AssetBundle

java.lang.Object
net.risingworld.api.assets.Asset
net.risingworld.api.assets.AssetBundle

public class AssetBundle extends Asset
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.
  • Methodendetails

    • loadFromFile

      public static AssetBundle loadFromFile(String file)
      Loads an asset bundle from a file on the hard drive.
      Parameter:
      file - the path to the asset bundle file on the harddrive.
      Gibt zurück:
      a new asset bundle instance.
      Example: Load asset bundle "examplebundle.bundle" from plugin folder
      1AssetBundle bundle = AssetBundle.loadFromFile(getPath() + "/examplebundle.bundle");
      2// do something with the asset bundle
    • getAllAssetNames

      public String[] getAllAssetNames()
      Gets all asset names (including their paths) in the asset bundle.
      Gibt zurück:
      a new array containing all names of the assets stored in this asset bundle.
    • loadTextAssetBytes

      public byte[] loadTextAssetBytes(String assetName)
    • loadTextAsset

      public String loadTextAsset(String assetName)