Version: 2021.3
LanguageEnglish
  • C#

SpeedTreeImporter

class in UnityEditor

/

Inherits from:AssetImporter

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual

Description

AssetImportor for importing SpeedTree model assets.

Static Properties

windQualityNamesGets an array of name strings for wind quality value.

Properties

alphaTestRefGets and sets a default alpha test reference values.
animateCrossFadingIndicates if the cross-fade LOD transition, applied to the last mesh LOD and the billboard, should be animated.
bestWindQualityReturns the best-possible wind quality on this asset (configured in SpeedTree modeler).
billboardTransitionCrossFadeWidthProportion of the last 3D mesh LOD region width which is used for cross-fading to billboard tree.
castShadowsGets and sets an array of booleans to enable shadow casting for each LOD.
defaultBillboardShaderReturns the default SpeedTree billboard shader for the active render pipeline, or null if the asset is a SpeedTree v8 asset.
defaultShaderReturns the default SpeedTree shader for the active render pipeline (either v7 or v8 according to the asset version).
enableBumpGets and sets an array of booleans to enable normal mapping for each LOD.
enableHueGets and sets an array of booleans to enable Hue variation effect for each LOD.
enableSmoothLODTransitionEnables smooth LOD transitions.
enableSubsurfaceGets and sets an array of booleans to enable Subsurface effect for each LOD (affects only SpeedTree v8 assets).
fadeOutWidthProportion of the billboard LOD region width which is used for fading out the billboard.
hasBillboardTells if there is a billboard LOD.
hasImportedTells if the SPM file has been previously imported.
hueVariationGets and sets a default Hue variation color and amount (in alpha).
isV8Returns true if the asset is a SpeedTree v8 asset.
LODHeightsGets and sets an array of floats of each LOD's screen height value.
mainColorGets and sets a default main color.
materialFolderPathReturns the folder path where generated materials will be placed in.
materialLocationMaterial import location options.
receiveShadowsGets and sets an array of booleans to enable shadow receiving for each LOD.
scaleFactorHow much to scale the tree model compared to what is in the .spm file.
useLightProbesGets and sets an array of booleans to enable Light Probe lighting for each LOD.
windQualitiesGets and sets an array of integers of the wind qualities on each LOD. Values will be clampped by bestWindQuality internally.

Constructors

SpeedTreeImporterConstruct a new SpeedTreeImporter object.

Public Methods

GenerateMaterialsGenerates all necessary materials under materialFolderPath. If Version Control is enabled please first check out the folder.
SearchAndRemapMaterialsSearch the project for matching materials and use them instead of the internal materials.

Inherited Members

Properties

assetBundleNameGet or set the AssetBundle name.
assetBundleVariantGet or set the AssetBundle variant.
assetPathThe path name of the asset for this importer. (Read Only)
importSettingsMissingThe value is true when no meta file is provided with the imported asset.
userDataGet or set any user data.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public Methods

AddRemapMap a sub-asset from an imported asset (such as an FBX file) to an external Asset of the same type.
GetExternalObjectMapGets a copy of the external object map used by the AssetImporter.
RemoveRemapRemoves an item from the map of external objects.
SaveAndReimportSave asset importer settings if asset importer is dirty.
SetAssetBundleNameAndVariantSet the AssetBundle name and variant.
SupportsRemappedAssetTypeChecks if the AssetImporter supports remapping the given asset type.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static Methods

GetAtPathRetrieves the asset importer for the asset at path.
DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.