Show / Hide Table of Contents

Class TextTemplateImporter

The TextTemplate (.tt) file importer for Unity3D

Inheritance
System.Object
TextTemplateImporter
Namespace: FasterGames.T4.Editor
Assembly: cs.temp.dll.dll
Syntax
public class TextTemplateImporter : ScriptedImporter
Remarks

This importer relies on mono/t4 to parse templates and generate csharp files

Fields

additionalTypes

Additional types to import into the template context.

Declaration
public List<string> additionalTypes
Field Value
Type Description
System.Collections.Generic.List<System.String>
Remarks

Use this if your embeddedData includes data types that are outside the default referenced types

Examples

If embeddedData contained MyCustomNameSpace.MyCustomType dataElement then you'd add MyCustomNameSpace.MyCustomType here.

embeddedData

Data to be embedded in the template host, so it can be accessed by the template

Declaration
public UnityEngine.Object embeddedData
Field Value
Type Description
UnityEngine.Object

importerVersion

Flag; determines which importer feature-set is supported

Declaration
public ImporterVersion importerVersion
Field Value
Type Description
ImporterVersion

removeIfEmptyGeneration

Flag; If set, any empty files that are generated will be ignored.

Declaration
public bool removeIfEmptyGeneration
Field Value
Type Description
System.Boolean

Methods

OnImportAsset(AssetImportContext)

Declaration
public override void OnImportAsset(AssetImportContext ctx)
Parameters
Type Name Description
AssetImportContext ctx
In This Article
Back to top Copyright FasterGames ©