{"id":13662582,"url":"https://github.com/deniszykov/t4-templates-unity3d","last_synced_at":"2025-04-10T21:21:06.460Z","repository":{"id":86091369,"uuid":"59401990","full_name":"deniszykov/t4-templates-unity3d","owner":"deniszykov","description":"T4 Text Template Processor for Unity3D","archived":false,"fork":false,"pushed_at":"2022-10-05T16:08:09.000Z","size":3806,"stargazers_count":88,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-29T00:43:20.055Z","etag":null,"topics":["t4","unity","unity-asset","unity-editor","unity3d","unity3d-plugin"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deniszykov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-22T08:20:01.000Z","updated_at":"2023-12-15T03:31:01.000Z","dependencies_parsed_at":"2023-03-02T09:15:31.264Z","dependency_job_id":null,"html_url":"https://github.com/deniszykov/t4-templates-unity3d","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deniszykov%2Ft4-templates-unity3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deniszykov%2Ft4-templates-unity3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deniszykov%2Ft4-templates-unity3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deniszykov%2Ft4-templates-unity3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deniszykov","download_url":"https://codeload.github.com/deniszykov/t4-templates-unity3d/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298956,"owners_count":21080440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["t4","unity","unity-asset","unity-editor","unity3d","unity3d-plugin"],"created_at":"2024-08-02T05:02:02.661Z","updated_at":"2025-04-10T21:21:06.445Z","avatar_url":"https://github.com/deniszykov.png","language":"C#","funding_links":[],"categories":["Text-Template","C\\#","Editor Utility"],"sub_categories":[],"readme":"# Introduction\nThis Unity [editor extension](https://assetstore.unity.com/packages/tools/utilities/t4-code-generation-63294) provides [T4 text templates](https://msdn.microsoft.com/en-US/library/bb126445.aspx) processor. \nT4 template is a mixture of text blocks and control logic that can generate a text file. The control logic is written as fragments of program code in C#.\nThe generated file can be text of any kind, such as resource file, source code or web page.\n\nT4 template example:\n```csharp\n\u003chtml\u003e\u003cbody\u003e\n The date and time now is: \u003c#= DateTime.Now #\u003e\n\u003c/body\u003e\u003c/html\u003e\n```\n\n## Use cases\n* Source code generation\n* [Project resources catalogization](GameDevWare.TextTransform.Unity/Assets/Editor/GameDevWare.TextTransform/Examples/FileList_Example.tt)\n* [Resource loading/reading code generation](GameDevWare.TextTransform.Unity/Assets/Editor/GameDevWare.TextTransform/Examples/ResourceAsyncLoad_Example.tt)\n* [Code generation by DSL](GameDevWare.TextTransform.Unity/Assets/Editor/GameDevWare.TextTransform/Examples/DSL_Example.tt)\n* Code generation for ORM (BLToolkit for example)\n* [Embedding environment information into project's build](GameDevWare.TextTransform.Unity/Assets/Editor/GameDevWare.TextTransform/Examples/EnvironmentInfo_Example.tt)\n\t\n## How to use\nCreate or copy file with **.tt** extension. Select this file in Project window (Window -\u003e Project), then in Inspector window (Window -\u003e Inspector) setup T4 template's parameters. Click \"Generate\" button.\nInspector window for T4 template contains following parameters:\n* **Output Type** - type of generated file\n  * **Text** - normal template's output. It corresponds to \"Design-time T4 text templates\" in Microsoft's terminology.\n  * **Text Generator** - generator-class which can generate content when TransformText() is called. It corresponds to \"Run time T4 text templates\" in Microsoft's terminology.\n* **Output Path** - path to generated file. If not specified, generated file will have file name of template and file extension from *output* directive.\n* **Auto-Gen Triggers** - list of events which trigger auto-generation.\n  * **Code Compilation** - after each code compilation\n  * **Asset Changes** - after watched assets are changed, look for **Assets to Watch**\n* **Auto-Gen Delay (Ms)** - delay before triggered auto-generation starts\n* **Assets to Watch** - list of assets and folders which trigger auto-generation\n\n## Details\nT4 template can use *hostspecific=true* [property](https://msdn.microsoft.com/en-us/library/bb126478.aspx#Anchor_4) to access *Host.ResolvePath* method, which maps path relatively to template's location.\n\nBy default *UnityEngine.dll* and *UnityEditor.dll* assemblies are referenced in all templates. \nYou can reference project's assemblies *Assembly-CSharp* and *Assembly-CSharp-firstpass* by adding **assembly** [directive](https://msdn.microsoft.com/en-us/library/bb126478.aspx#Anchor_3):\n```xml\n\u003c#@ assembly name=\"Assembly-CSharp\" #\u003e\n\u003c#@ assembly name=\"Assembly-CSharp-firstpass\" #\u003e\n```\n### Target Runtime\nThe template always uses the current runtime and core libraries of Unity Editor. \n\n### Language Version\nYou could specify C# language version with `language=` directive.\nList of available language versions:\n* language=\"C#v3.5\" - C# version 3.5.\n* language=\"C#\" - C# up to version 6, depending on Unity Editor's version.\n* language=\"C#/Unity\" - C# version based on Roslyn shipped with Unity Editor.\n* unspecified - It is currently the equivalent of \"C#/Unity\".\n\n\n[MSBuild Macros](https://msdn.microsoft.com/en-US/library/c02as0cs.aspx) are not available.\n\nYou can run template generation from your code with **UnityTemplateGenerator.RunForTemplate(templatePath)** call.\n\n## Version 2.0.0\nthere is some breaking changes due renaming in this version\n\n## Version 1.0.7\nfixed missing 's' in project name 'TextTran_S_form', files, namespaces, folders has been renamed.\nexecutable name of tools has been changed to 'GameDevWare.TextTransform.exe' new NuGet package will be published\n\n## Contacts\nPlease send any questions at support@gamedevware.com\n\n## License\n[Asset Store Terms of Service and EULA](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeniszykov%2Ft4-templates-unity3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeniszykov%2Ft4-templates-unity3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeniszykov%2Ft4-templates-unity3d/lists"}