t4-templates-unity3d
t4-templates-unity3d copied to clipboard
Parameters for generation
Hi, when using UnityTemplateGenerator. RunForTemplate(templatePath):
- is there a way to pass additional parameters to the template when generating? (Possibly via Host property)
- is there a way to specify output path so that the same .tt file can be used to generate multiple output files?
Hi @slimshader . Currently there is no option to provide parameters or to specify output path for generator. I could add it for you. In a few days I will release new version.
That would be great, thanks! Question tho: the matter of license is not really clear to me, I only by coincidence discovered that the same asset is also on the Asset Store but here it says it only need the link and some kind of warning?
Oh, Unity broke it's own references to Asset Store. Fixed.
License is standard Unity Asset Store License. Short version - pay 10$, use at any number of projects, any number of games for your organization.
Warning in license section says - If you want to make you own asset for Unity Asset Store which is using my t4-templates, at least provide a link to my t4-templates.
Added parameters passing to template in version 2.0.0. You could download and update DLL or wait for Unity Asset update.
Here is example of template with parameters and code to run it.
looking great, thanks! is there a way to pass output file name also? i know that it is not strictly to T4 convention but it would be very useful when running same template for multiple input sets. Using a hack at the moment that writes a file from within a template
There is multiple optional parameters in RunForTemplate now. I have added outputPath too.
oh, I missed that, that is great, thanks