How do I split sourceName by '.' and take the last part? #8695
Unanswered
deerchao
asked this question in
Template authoring
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In my project template, I have a
template.json
:and a
MyPluginConfig.cs
It worked great inside a folder named
MyAwesomePlugin
, the class generated is namedMyAwesomePluginConfig
.But it won't compile used in folder
My.Awesome.Plugin
, because the generated class nameMy.Awesome.PluginConfig
is not valid C# identifier.Now, how do I get the last part of
sourceName
(Plugin
inMy.Awesome.Plugin
), and use it to create a class namedPluginConfig
? Or is there a better way to work around this invalid identifier issue?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions