11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics . Eventing . Reader ;
34using System . IO ;
45using System . Linq ;
56using System . Reflection ;
@@ -12,15 +13,15 @@ namespace ShaderlabVS.Data
1213 public class ShaderlabDataManager
1314 {
1415 #region Constants
15- public const string HLSL_CG_DATATYPE_DEFINATIONFILE = "Data\\ HLSL_CG_datatype.def" ;
16- public const string HLSL_CG_FUNCTION_DEFINATIONFILE = "Data\\ HLSL_CG_functions.def" ;
17- public const string HLSL_CG_KEYWORD_DEFINATIONFILE = "Data\\ HLSL_CG_Keywords.def" ;
18-
19- public const string UNITY3D_DATATYPE_DEFINATIONFILE = "Data\\ Unity3D_datatype.def" ;
20- public const string UNITY3D_FUNCTION_DEFINATIONFILE = "Data\\ Unity3D_functions.def" ;
21- public const string UNITY3D_KEYWORD_DEFINATIONFILE = "Data\\ Unity3D_keywords.def" ;
22- public const string UNITY3D_MACROS_DEFINATIONFILE = "Data\\ Unity3D_macros.def" ;
23- public const string UNITY3D_VALUES_DEFINATIONFILE = "Data\\ Unity3D_values.def" ;
16+ public static string HLSL_CG_DATATYPE_DEFINATIONFILE = "Data" + Path . DirectorySeparatorChar . ToString ( ) + " HLSL_CG_datatype.def";
17+ public static string HLSL_CG_FUNCTION_DEFINATIONFILE = "Data" + Path . DirectorySeparatorChar . ToString ( ) + " HLSL_CG_functions.def";
18+ public static string HLSL_CG_KEYWORD_DEFINATIONFILE = "Data" + Path . DirectorySeparatorChar . ToString ( ) + " HLSL_CG_Keywords.def";
19+
20+ public static string UNITY3D_DATATYPE_DEFINATIONFILE = "Data" + Path . DirectorySeparatorChar . ToString ( ) + " Unity3D_datatype.def";
21+ public static string UNITY3D_FUNCTION_DEFINATIONFILE = "Data" + Path . DirectorySeparatorChar . ToString ( ) + " Unity3D_functions.def";
22+ public static string UNITY3D_KEYWORD_DEFINATIONFILE = "Data" + Path . DirectorySeparatorChar . ToString ( ) + " Unity3D_keywords.def";
23+ public static string UNITY3D_MACROS_DEFINATIONFILE = "Data" + Path . DirectorySeparatorChar . ToString ( ) + " Unity3D_macros.def";
24+ public static string UNITY3D_VALUES_DEFINATIONFILE = "Data" + Path . DirectorySeparatorChar . ToString ( ) + " Unity3D_values.def";
2425 #endregion
2526
2627 #region Properties
@@ -69,7 +70,7 @@ public static ShaderlabDataManager Instance
6970
7071 private ShaderlabDataManager ( )
7172 {
72- string currentAssemblyDir = ( new FileInfo ( Assembly . GetExecutingAssembly ( ) . CodeBase . Substring ( 8 ) ) ) . DirectoryName ;
73+ string currentAssemblyDir = ( new FileInfo ( Assembly . GetExecutingAssembly ( ) . Location ) ) . DirectoryName ;
7374 HLSLCGFunctions = DefinationDataProvider < HLSLCGFunction > . ProvideFromFile ( Path . Combine ( currentAssemblyDir , ShaderlabDataManager . HLSL_CG_FUNCTION_DEFINATIONFILE ) ) ;
7475
7576 List < HLSLCGKeywords > hlslcgKeywords = DefinationDataProvider < HLSLCGKeywords > . ProvideFromFile ( Path . Combine ( currentAssemblyDir , ShaderlabDataManager . HLSL_CG_KEYWORD_DEFINATIONFILE ) ) ;
0 commit comments