AI-generated Key Takeaways
-
AssetDefinitionin Sceneform defines individual assets like models and materials for use in AR experiences. -
Each asset definition triggers two build tasks:
createAsset(generates .sfa) andcompileAsset(generates .sfb). -
File paths within the definition are relative to the Gradle build directory.
-
Developers can specify source files for models, animations, materials and output file paths through dedicated methods.
-
An .sfa file defines build details; if absent, a default one is generated during the build process.
Defines a single Sceneform asset, including the model source file, the material to embed, the asset definition file (sfa), and the asset bundle file (sfb).
Instances of this class are placed inside of the SceneformAssets
instance in a gradle build.
Each asset definition generates two tasks, a createAsset task and a compileAsset task, using the task suffix to distinguish asset builds from one another. The createAsset task generates the .sfa file when it does not exist, and the compileAsset task, depends on the createAsset task, and generates the .sfb file when any of the .sfb file's inputs have changed.
All paths are relative to the gradle build in which this definition resides.
Public Constructors
Public Methods
| void |
animationPath(String animationPath)
Sets a path to an input .fbx, file from which animations will be imported and appended to the
current asset sfb file.
|
| void | |
| void | |
| void | |
| void |
Inherited Methods
Public Constructors
public AssetDefinition ()
Public Methods
public void animationPath (String animationPath)
Sets a path to an input .fbx, file from which animations will be imported and appended to the current asset sfb file.
Parameters
| animationPath | The relative path to the fbx file. |
|---|
public void materialPath (String materialPath)
Sets the input material.
Parameters
| materialPath | Only accepted value: 'default'. |
|---|
public void modelPath (String modelPath)
Sets the path to the input .obj, .fbx, or .gltf file.
Parameters
| modelPath | The relative path to the model file. |
|---|
public void sfaPath (String sfaPath)
Sets the path to the .sfa defining the details of how this asset will be built. Note that when the .sfa does not exist, building this asset results in a default .sfa file being generated. When the .sfa does exist it is used as input, defining the parameters used to build the .sfb.
Parameters
| sfaPath | The relative path to the .sfa file. |
|---|
public void sfbPath (String sfbPath)
Sets the path where the asset build will place the .sfb output file.
Parameters
| sfbPath | The relative path where the .sfb file should be placed. |
|---|