TriLib  1.8.7f
TriLib Unity Package
TriLib.AssetLoaderOptions Class Reference

Represents a series of asset loading options. More...

Inheritance diagram for TriLib.AssetLoaderOptions:

Public Member Functions

void Deserialize (string json)
 Deserialize the specified JSON representation into this class. More...
 
string Serialize ()
 Serializes this instance to a JSON representation. More...
 

Static Public Member Functions

static AssetLoaderOptions CreateInstance ()
 Returns a new AssetLoaderOptions instance. More...
 

Public Attributes

bool AddAssetUnloader
 Turn on this field to add AssetUnloader behaviour to loaded UnityEngine.GameObject and automatically free resources when it's destroyed. More...
 
bool DontLoadAnimations
 Turn on this field to disable animations loading. More...
 
bool DontApplyAnimations
 Turn on this field to disable applying loaded animations. More...
 
bool DontLoadLights = true
 Turn on this field to disable lights loading. More...
 
bool DontLoadCameras = true
 Turn on this field to disable cameras loading. More...
 
bool AutoPlayAnimations = true
 Turn on this field to automatically play the first loaded animation. More...
 
WrapMode AnimationWrapMode = WrapMode.Loop
 Use this field to change default animations wrap mode. More...
 
bool UseLegacyAnimations = true
 Turn on this field to use legacy UnityEngine.Animation component. More...
 
bool EnsureQuaternionContinuity = true
 Turn on this field to realigns quaternion keys to ensure shortest interpolation paths. More...
 
RuntimeAnimatorController AnimatorController
 If you don´t wish to use legacy animations, use this field to specify a UnityEngine.RuntimeAnimatorController. More...
 
Avatar Avatar
 If you don´t wish to use legacy animations, use this field to specify an existing UnityEngine.Avatar for using. More...
 
bool DontGenerateAvatar
 Turn on this field if you gonna generate your own UnityEngine.Avatar later. More...
 
bool DontLoadMetadata
 Turn on this field to disable metadata loading. More...
 
bool DontLoadMaterials
 Turn on this field to disable materials loading. More...
 
bool ApplyAlphaMaterials
 Turn on this field to automatically scan and apply alpha channel materials per pixel (may decrease performance). More...
 
bool DisableAlphaMaterials
 Turn on this field to disable transparent materials creation. More...
 
bool UseCutoutMaterials = true
 Turn on this field to use cutout materials instead of alpha-blended materials. More...
 
bool UseStandardSpecularMaterial = false
 Turn on this field to use the Unity default specular material. More...
 
bool DontLoadMeshes
 Turn on this field to disable meshes loading. More...
 
bool CombineMeshes = true
 Turn on this field to combine loaded meshes. More...
 
bool GenerateMeshColliders
 Turn on this field to enable mesh collider generation More...
 
bool ConvexMeshColliders
 Turn on this field to indicate that generated mesh collider will be convex. More...
 
Vector3 RotationAngles = new Vector3(0f, 180f,0f)
 Use this field to override object rotation angles. More...
 
float Scale = 1f
 Use this field to override object scale. More...
 
AssimpPostProcessSteps PostProcessSteps = AssimpPostProcessSteps.FlipWindingOrder | AssimpPostProcessSteps.MakeLeftHanded | AssimpProcessPreset.TargetRealtimeMaxQuality
 Use this field to set-up advanced object loading options. AssimpPostProcessSteps More...
 
TextureCompression TextureCompression = TextureCompression.NormalQuality
 Use this field to set loaded textures compression level. More...
 
bool GenerateMipMaps = true
 Enable this field to generate textures mipmaps. More...
 
List< AssetAdvancedConfigAdvancedConfigs
 Use this field to define asset loading advanced configs. More...
 

Detailed Description

Represents a series of asset loading options.

Member Function Documentation

◆ CreateInstance()

static AssetLoaderOptions TriLib.AssetLoaderOptions.CreateInstance ( )
static

Returns a new AssetLoaderOptions instance.

Returns
The instance.

◆ Deserialize()

void TriLib.AssetLoaderOptions.Deserialize ( string  json)

Deserialize the specified JSON representation into this class.

Parameters
jsonJson.

◆ Serialize()

string TriLib.AssetLoaderOptions.Serialize ( )

Serializes this instance to a JSON representation.

Member Data Documentation

◆ AddAssetUnloader

bool TriLib.AssetLoaderOptions.AddAssetUnloader

Turn on this field to add AssetUnloader behaviour to loaded UnityEngine.GameObject and automatically free resources when it's destroyed.

◆ AdvancedConfigs

List<AssetAdvancedConfig> TriLib.AssetLoaderOptions.AdvancedConfigs
Initial value:
= new List<AssetAdvancedConfig>
{
AssetAdvancedConfig.CreateConfig(AssetAdvancedPropertyClassNames.SplitLargeMeshesVertexLimit, 65000),
AssetAdvancedConfig.CreateConfig(AssetAdvancedPropertyClassNames.FBXImportReadLights, false),
AssetAdvancedConfig.CreateConfig(AssetAdvancedPropertyClassNames.FBXImportReadCameras, false)
}

Use this field to define asset loading advanced configs.

◆ AnimationWrapMode

WrapMode TriLib.AssetLoaderOptions.AnimationWrapMode = WrapMode.Loop

Use this field to change default animations wrap mode.

◆ AnimatorController

RuntimeAnimatorController TriLib.AssetLoaderOptions.AnimatorController

If you don´t wish to use legacy animations, use this field to specify a UnityEngine.RuntimeAnimatorController.

◆ ApplyAlphaMaterials

bool TriLib.AssetLoaderOptions.ApplyAlphaMaterials

Turn on this field to automatically scan and apply alpha channel materials per pixel (may decrease performance).

◆ AutoPlayAnimations

bool TriLib.AssetLoaderOptions.AutoPlayAnimations = true

Turn on this field to automatically play the first loaded animation.

Note
Only for legacy animations.

◆ Avatar

Avatar TriLib.AssetLoaderOptions.Avatar

If you don´t wish to use legacy animations, use this field to specify an existing UnityEngine.Avatar for using.

◆ CombineMeshes

bool TriLib.AssetLoaderOptions.CombineMeshes = true

Turn on this field to combine loaded meshes.

◆ ConvexMeshColliders

bool TriLib.AssetLoaderOptions.ConvexMeshColliders

Turn on this field to indicate that generated mesh collider will be convex.

◆ DisableAlphaMaterials

bool TriLib.AssetLoaderOptions.DisableAlphaMaterials

Turn on this field to disable transparent materials creation.

◆ DontApplyAnimations

bool TriLib.AssetLoaderOptions.DontApplyAnimations

Turn on this field to disable applying loaded animations.

◆ DontGenerateAvatar

bool TriLib.AssetLoaderOptions.DontGenerateAvatar

Turn on this field if you gonna generate your own UnityEngine.Avatar later.

◆ DontLoadAnimations

bool TriLib.AssetLoaderOptions.DontLoadAnimations

Turn on this field to disable animations loading.

◆ DontLoadCameras

bool TriLib.AssetLoaderOptions.DontLoadCameras = true

Turn on this field to disable cameras loading.

◆ DontLoadLights

bool TriLib.AssetLoaderOptions.DontLoadLights = true

Turn on this field to disable lights loading.

◆ DontLoadMaterials

bool TriLib.AssetLoaderOptions.DontLoadMaterials

Turn on this field to disable materials loading.

◆ DontLoadMeshes

bool TriLib.AssetLoaderOptions.DontLoadMeshes

Turn on this field to disable meshes loading.

◆ DontLoadMetadata

bool TriLib.AssetLoaderOptions.DontLoadMetadata

Turn on this field to disable metadata loading.

◆ EnsureQuaternionContinuity

bool TriLib.AssetLoaderOptions.EnsureQuaternionContinuity = true

Turn on this field to realigns quaternion keys to ensure shortest interpolation paths.

This can cause glitches on some animations.

◆ GenerateMeshColliders

bool TriLib.AssetLoaderOptions.GenerateMeshColliders

Turn on this field to enable mesh collider generation

Note
Only for non-skinned mesh renderers.

◆ GenerateMipMaps

bool TriLib.AssetLoaderOptions.GenerateMipMaps = true

Enable this field to generate textures mipmaps.

◆ PostProcessSteps

Use this field to set-up advanced object loading options. AssimpPostProcessSteps

◆ RotationAngles

Vector3 TriLib.AssetLoaderOptions.RotationAngles = new Vector3(0f, 180f,0f)

Use this field to override object rotation angles.

◆ Scale

float TriLib.AssetLoaderOptions.Scale = 1f

Use this field to override object scale.

◆ TextureCompression

TextureCompression TriLib.AssetLoaderOptions.TextureCompression = TextureCompression.NormalQuality

Use this field to set loaded textures compression level.

◆ UseCutoutMaterials

bool TriLib.AssetLoaderOptions.UseCutoutMaterials = true

Turn on this field to use cutout materials instead of alpha-blended materials.

◆ UseLegacyAnimations

bool TriLib.AssetLoaderOptions.UseLegacyAnimations = true

Turn on this field to use legacy UnityEngine.Animation component.

◆ UseStandardSpecularMaterial

bool TriLib.AssetLoaderOptions.UseStandardSpecularMaterial = false

Turn on this field to use the Unity default specular material.


The documentation for this class was generated from the following file: