Package 

Class File

  • All Implemented Interfaces:
    app.rive.runtime.kotlin.core.RefCount

    @OpenForTesting() 
    public final class File
    extends NativeObject
                        

    Files are created in the Rive editor.

    This object has a counterpart in C++, which implements much of its functionality. The base class's cppPointer keeps track of this relationship.

    You can export .riv from the editor and use this class to load them. Files may contain multiple artboards.

    If the given file cannot be loaded this will throw a RiveException. The Rive File format is evolving, and while we attempt to keep backwards (and forwards) compatibility where possible, there are times when this is not possible.

    The Rive editor will always export your file in the latest runtime format.

    ⚠️ Important: If you create a File yourself using this constructor, you are responsible for calling release when you are done with it, otherwise it will leak memory.