TriLib
1.9.0
TriLib Unity Package
|
Represents a series of asset loading options. More...
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 | ForceAnimationComponents |
Turn on this field to force the animation components creation even when there are no animations on the source model. 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... | |
bool | UseOriginalPositionRotationAndScale = false |
Turn on this field to use the original file orientation and rotation. That would fix issues with DAE files orientations, among others. 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 processing and metadata processing callback (AssetLoaderBase.OnMetadataProcessed). More... | |
bool | DontAddMetadataCollection |
Turn on this field to don't add the AssimpMetadataCollection component to the loaded UnityEngine.GameObjects. More... | |
bool | DontLoadMaterials |
Turn on this field to disable materials loading. More... | |
bool | ApplyColorAlpha = true |
Turn off this field to disable alpha color value on loaded materials. More... | |
bool | ApplyDiffuseColor = true |
Turn off this field to disable diffuse color on loaded materials. More... | |
bool | ApplyEmissionColor = true |
Turn off this field to disable emission color on loaded materials. More... | |
bool | ApplySpecularColor = true |
Turn off this field to disable specular color on loaded materials. More... | |
bool | ApplyDiffuseTexture = true |
Turn off this field to disable diffuse texture on loaded materials. More... | |
bool | ApplyEmissionTexture = true |
Turn off this field to disable emission texture on loaded materials. More... | |
bool | ApplySpecularTexture = true |
Turn off this field to disable specular texture on loaded materials. More... | |
bool | ApplyNormalTexture = true |
Turn off this field to disable normal texture on loaded materials. More... | |
bool | ApplyDisplacementTexture = true |
Turn off this field to disable displacement texture on loaded materials. More... | |
bool | ApplyOcclusionTexture = true |
Turn off this field to disable occlusion texture on loaded materials. More... | |
bool | ApplyMetallicTexture = true |
Turn off this field to disable metallic texture on loaded materials. More... | |
bool | ApplyNormalScale = true |
Turn off this field to disable normal scale on loaded materials. More... | |
bool | ApplyGlossiness = true |
Turn off this field to disable glossiness on loaded materials. More... | |
bool | ApplyGlossinessScale = true |
Turn off this field to disable glossiness scale on loaded materials. More... | |
bool | LoadRawMaterialProperties |
Turn on this field to load additional material properties (located on loaded MaterialData collection). More... | |
bool | DisableAlphaMaterials |
Turn on this field to disable transparent materials creation. More... | |
bool | ApplyAlphaMaterials |
Turn on this field to automatically scan and apply alpha channel materials by checking textures per pixel (may decrease performance). More... | |
bool | ScanForAlphaMaterials |
Turn on this field to automatically scan and apply alpha channel materials by checking textures per pixel (may decrease performance). More... | |
bool | UseCutoutMaterials |
Turn on this field to use cutout materials instead of alpha-blended materials. More... | |
bool | UseStandardSpecularMaterial |
Turn on this field to use the Unity default specular material. More... | |
MaterialShadingMode | MaterialShadingMode |
Change this field to switch between Standard, Specular and Roughness setup materials. More... | |
MaterialTransparencyMode | MaterialTransparencyMode |
Change this field to switch between Alpha, Cutout and Fade transparency mode on materials. More... | |
bool | DontLoadMeshes |
Turn on this field to disable meshes loading. More... | |
bool | DontLoadBlendShapes |
Turn on this field to disable blend-shapes loading. More... | |
bool | DontLoadSkinning |
Turn on this field to disable skinning. 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... | |
FilterMode | TextureFilterMode = FilterMode.Bilinear |
Use this field to set the loaded textures filter mode. More... | |
bool | GenerateMipMaps = true |
Enable this field to generate textures mipmaps. More... | |
List< AssetAdvancedConfig > | AdvancedConfigs |
Use this field to define asset loading advanced configs. More... | |
Represents a series of asset loading options.
|
static |
Returns a new AssetLoaderOptions instance.
void TriLib.AssetLoaderOptions.Deserialize | ( | string | json | ) |
Deserialize the specified JSON representation into this class.
json | Json. |
string TriLib.AssetLoaderOptions.Serialize | ( | ) |
Serializes this instance to a JSON representation.
bool TriLib.AssetLoaderOptions.AddAssetUnloader |
Turn on this field to add AssetUnloader behaviour to loaded UnityEngine.GameObject and automatically free resources when it's destroyed.
List<AssetAdvancedConfig> TriLib.AssetLoaderOptions.AdvancedConfigs |
Use this field to define asset loading advanced configs.
WrapMode TriLib.AssetLoaderOptions.AnimationWrapMode = WrapMode.Loop |
Use this field to change default animations wrap mode.
RuntimeAnimatorController TriLib.AssetLoaderOptions.AnimatorController |
If you don´t wish to use legacy animations, use this field to specify a UnityEngine.RuntimeAnimatorController.
bool TriLib.AssetLoaderOptions.ApplyAlphaMaterials |
Turn on this field to automatically scan and apply alpha channel materials by checking textures per pixel (may decrease performance).
bool TriLib.AssetLoaderOptions.ApplyColorAlpha = true |
Turn off this field to disable alpha color value on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyDiffuseColor = true |
Turn off this field to disable diffuse color on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyDiffuseTexture = true |
Turn off this field to disable diffuse texture on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyDisplacementTexture = true |
Turn off this field to disable displacement texture on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyEmissionColor = true |
Turn off this field to disable emission color on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyEmissionTexture = true |
Turn off this field to disable emission texture on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyGlossiness = true |
Turn off this field to disable glossiness on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyGlossinessScale = true |
Turn off this field to disable glossiness scale on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyMetallicTexture = true |
Turn off this field to disable metallic texture on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyNormalScale = true |
Turn off this field to disable normal scale on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyNormalTexture = true |
Turn off this field to disable normal texture on loaded materials.
bool TriLib.AssetLoaderOptions.ApplyOcclusionTexture = true |
Turn off this field to disable occlusion texture on loaded materials.
bool TriLib.AssetLoaderOptions.ApplySpecularColor = true |
Turn off this field to disable specular color on loaded materials.
bool TriLib.AssetLoaderOptions.ApplySpecularTexture = true |
Turn off this field to disable specular texture on loaded materials.
bool TriLib.AssetLoaderOptions.AutoPlayAnimations = true |
Turn on this field to automatically play the first loaded animation.
Avatar TriLib.AssetLoaderOptions.Avatar |
If you don´t wish to use legacy animations, use this field to specify an existing UnityEngine.Avatar for using.
bool TriLib.AssetLoaderOptions.CombineMeshes = true |
Turn on this field to combine loaded meshes.
bool TriLib.AssetLoaderOptions.ConvexMeshColliders |
Turn on this field to indicate that generated mesh collider will be convex.
bool TriLib.AssetLoaderOptions.DisableAlphaMaterials |
Turn on this field to disable transparent materials creation.
bool TriLib.AssetLoaderOptions.DontAddMetadataCollection |
Turn on this field to don't add the AssimpMetadataCollection component to the loaded UnityEngine.GameObjects.
bool TriLib.AssetLoaderOptions.DontApplyAnimations |
Turn on this field to disable applying loaded animations.
bool TriLib.AssetLoaderOptions.DontGenerateAvatar |
Turn on this field if you gonna generate your own UnityEngine.Avatar later.
bool TriLib.AssetLoaderOptions.DontLoadAnimations |
Turn on this field to disable animations loading.
bool TriLib.AssetLoaderOptions.DontLoadBlendShapes |
Turn on this field to disable blend-shapes loading.
bool TriLib.AssetLoaderOptions.DontLoadCameras = true |
Turn on this field to disable cameras loading.
bool TriLib.AssetLoaderOptions.DontLoadLights = true |
Turn on this field to disable lights loading.
bool TriLib.AssetLoaderOptions.DontLoadMaterials |
Turn on this field to disable materials loading.
bool TriLib.AssetLoaderOptions.DontLoadMeshes |
Turn on this field to disable meshes loading.
bool TriLib.AssetLoaderOptions.DontLoadMetadata |
Turn on this field to disable metadata processing and metadata processing callback (AssetLoaderBase.OnMetadataProcessed).
bool TriLib.AssetLoaderOptions.DontLoadSkinning |
Turn on this field to disable skinning.
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.
bool TriLib.AssetLoaderOptions.ForceAnimationComponents |
Turn on this field to force the animation components creation even when there are no animations on the source model.
bool TriLib.AssetLoaderOptions.GenerateMeshColliders |
Turn on this field to enable mesh collider generation
bool TriLib.AssetLoaderOptions.GenerateMipMaps = true |
Enable this field to generate textures mipmaps.
bool TriLib.AssetLoaderOptions.LoadRawMaterialProperties |
Turn on this field to load additional material properties (located on loaded MaterialData collection).
MaterialShadingMode TriLib.AssetLoaderOptions.MaterialShadingMode |
Change this field to switch between Standard, Specular and Roughness setup materials.
MaterialTransparencyMode TriLib.AssetLoaderOptions.MaterialTransparencyMode |
Change this field to switch between Alpha, Cutout and Fade transparency mode on materials.
AssimpPostProcessSteps TriLib.AssetLoaderOptions.PostProcessSteps = AssimpPostProcessSteps.FlipWindingOrder | AssimpPostProcessSteps.MakeLeftHanded | AssimpProcessPreset.TargetRealtimeMaxQuality |
Use this field to set-up advanced object loading options. AssimpPostProcessSteps
Vector3 TriLib.AssetLoaderOptions.RotationAngles = new Vector3(0f, 180f, 0f) |
Use this field to override object rotation angles.
float TriLib.AssetLoaderOptions.Scale = 1f |
Use this field to override object scale.
bool TriLib.AssetLoaderOptions.ScanForAlphaMaterials |
Turn on this field to automatically scan and apply alpha channel materials by checking textures per pixel (may decrease performance).
TextureCompression TriLib.AssetLoaderOptions.TextureCompression = TextureCompression.NormalQuality |
Use this field to set loaded textures compression level.
FilterMode TriLib.AssetLoaderOptions.TextureFilterMode = FilterMode.Bilinear |
Use this field to set the loaded textures filter mode.
bool TriLib.AssetLoaderOptions.UseCutoutMaterials |
Turn on this field to use cutout materials instead of alpha-blended materials.
bool TriLib.AssetLoaderOptions.UseLegacyAnimations = true |
Turn on this field to use legacy UnityEngine.Animation component.
bool TriLib.AssetLoaderOptions.UseOriginalPositionRotationAndScale = false |
Turn on this field to use the original file orientation and rotation. That would fix issues with DAE files orientations, among others.
This field is turned off by default, to avoid breaking changes with existing code. When enabled, TriLib will create a wrapper object on top of the object you load, to keep the object original local transform. It's recommended to set this field to true
on your AssetLoaderOptions instance.
bool TriLib.AssetLoaderOptions.UseStandardSpecularMaterial |
Turn on this field to use the Unity default specular material.