Package 

Class Asset

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    
    public class Asset<H extends Object>
     implements AutoCloseable
                        

    Base class for assets managed by a CommandQueue.

    Uses ops to perform operations specific to the asset type.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Asset.Companion
    • Method Summary

      Modifier and Type Method Description
      final Unit register(String key) Register the asset with the given key.
      final Unit unregister(String key) Unregister the asset with the given key.
      • Methods inherited from class app.rive.Asset

        close
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • register

         final Unit register(String key)

        Register the asset with the given key. When Rive fulfills a referenced asset, it will look for an asset registered under that key. The key comes from the zip file created when exporting a Rive file.

        Be sure to unregister it with unregister when done.

        Parameters:
        key - The key to register the asset under.
      • unregister

         final Unit unregister(String key)

        Unregister the asset with the given key.

        Parameters:
        key - The key to unregister the asset from.