add: Registry
This commit is contained in:
26
AssetInfo.cs
Normal file
26
AssetInfo.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace Hangman.SDK.Generators;
|
||||
|
||||
|
||||
using System;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
|
||||
|
||||
public struct AssetInfo
|
||||
{
|
||||
public INamedTypeSymbol Symbol;
|
||||
public string Path;
|
||||
public ClassDeclarationSyntax DeclarationSyntax;
|
||||
public string ClassName;
|
||||
public string ClassFullName;
|
||||
public string GodotPath {
|
||||
get
|
||||
{
|
||||
string rs = Path.Replace("\\", "/").Replace(" ", "%20");
|
||||
rs = rs.Substring(rs.IndexOf("Assets", StringComparison.Ordinal));
|
||||
return "res://" + rs;
|
||||
}
|
||||
}
|
||||
|
||||
public string ScenePath => GodotPath.Replace(".cs", ".tscn");
|
||||
}
|
||||
Reference in New Issue
Block a user