Klasse Asset

java.lang.Object
net.risingworld.api.assets.Asset
Bekannte direkte Unterklassen:
AssetBundle, MaterialAsset, MeshAsset, ModelAsset, ModelImportSettings, PrefabAsset, SoundAsset, StyleSheetAsset, TextureAsset

public abstract class Asset extends Object
Abstract base class representing a reference to an asset.
  • Felddetails

  • Methodendetails

    • getHandle

      public int getHandle()
      Gets the internal handle of this asset.
      Gibt zurück:
      the internal handle (ID).
    • getSource

      public Asset.Source getSource()
    • getType

      public Asset.Type getType()
    • getDependency

      public int getDependency()
    • getPath

      public String getPath()
      Gets the path to the asset.
      Gibt zurück:
      the path to the asset.
    • getExtension

      public String getExtension()
      Gets the asset extension. Usually this is only relevant for files loaded from the hard drive.
      Gibt zurück:
      the asset extension.
    • getChecksum

      public String getChecksum()
      Gets the checksum of this asset.
      Gibt zurück:
      the MD5 checksum, as a String.
    • isDisposed

      public boolean isDisposed()
      Gets whether or not the asset is already disposed (i.e the resources are released). Never use disposed assets!
      Gibt zurück:
      true if the asset is already disposed, false if not.
    • dispose

      public boolean dispose()
      Disposes the asset, i.e frees all resources. Call this method if you no longer need this asset.
      Gibt zurück:
      true if the asset was valid and found on native side, false if not.
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object