Coder Social home page Coder Social logo

Comments (7)

jknightdoeswork avatar jknightdoeswork commented on September 4, 2024

After using templateRelativePath instead of templateFullPath I am seeing these .cs file with long paths as their fill names:

\Users\jason\Desktop\swatchtest\swatchtest\Assets\Plugins\NaughtyAttributes\Scripts\Editor\CodeGeneration\FieldDrawerDatabase.cs
\Users\jason\Desktop\swatchtest\swatchtest\Assets\Plugins\NaughtyAttributes\Scripts\Editor\CodeGeneration\MethodDrawerDatabase.cs
\Users\jason\Desktop\swatchtest\swatchtest\Assets\Plugins\NaughtyAttributes\Scripts\Editor\CodeGeneration\PropertyDrawConditionDatabase.cs
\Users\jason\Desktop\swatchtest\swatchtest\Assets\Plugins\NaughtyAttributes\Scripts\Editor\CodeGeneration\PropertyDrawerDatabase.cs
\Users\jason\Desktop\swatchtest\swatchtest\Assets\Plugins\NaughtyAttributes\Scripts\Editor\CodeGeneration\PropertyGrouperDatabase.cs
\Users\jason\Desktop\swatchtest\swatchtest\Assets\Plugins\NaughtyAttributes\Scripts\Editor\CodeGeneration\PropertyMetaDatabase.cs
\Users\jason\Desktop\swatchtest\swatchtest\Assets\Plugins\NaughtyAttributes\Scripts\Editor\CodeGeneration\PropertyValidatorDatabase.cs

from naughtyattributes.

dbrizov avatar dbrizov commented on September 4, 2024

Thank you. I will try to make a fast fix :)

from naughtyattributes.

dbrizov avatar dbrizov commented on September 4, 2024

Ok. I think the loading of the templates should be working now.
Can you tell if the last line of code in the method works? Is scriptPath correct?

IOUtility.WriteToFile(scriptPath, Regex.Replace(scriptContent, @"\r\n|\n\r|\r|\n", Environment.NewLine));

from naughtyattributes.

jknightdoeswork avatar jknightdoeswork commented on September 4, 2024

Yup I think you've fixed it :) Thanks!

from naughtyattributes.

jknightdoeswork avatar jknightdoeswork commented on September 4, 2024

Actually these files keep getting created:

image

Note that these are FILENAMES not paths! ie: "\Users\jason\Desktop\swatchtest\swatchtest\Assets\Plugins\NaughtyAttributes\Scripts\Editor\CodeGeneration\FieldDrawerDatabase.cs" is the NAME OF THE FILE, and it exists at the location "\Users\jason\Desktop\swatchtest\swatchtest"

from naughtyattributes.

jknightdoeswork avatar jknightdoeswork commented on September 4, 2024

Heres a screenshot that demonstrates what I mean:

image

from naughtyattributes.

dbrizov avatar dbrizov commented on September 4, 2024

Yeah, you are right, they are filenames :D
Anyway, I know why they are keeping generated. I will make a button in the editor for a manual generation.
Thank you very much :)

from naughtyattributes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.