1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . Diagnostics . Eventing . Reader ;
3
4
using System . IO ;
4
5
using System . Linq ;
5
6
using System . Reflection ;
@@ -12,15 +13,15 @@ namespace ShaderlabVS.Data
12
13
public class ShaderlabDataManager
13
14
{
14
15
#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";
24
25
#endregion
25
26
26
27
#region Properties
@@ -69,7 +70,7 @@ public static ShaderlabDataManager Instance
69
70
70
71
private ShaderlabDataManager ( )
71
72
{
72
- string currentAssemblyDir = ( new FileInfo ( Assembly . GetExecutingAssembly ( ) . CodeBase . Substring ( 8 ) ) ) . DirectoryName ;
73
+ string currentAssemblyDir = ( new FileInfo ( Assembly . GetExecutingAssembly ( ) . Location ) ) . DirectoryName ;
73
74
HLSLCGFunctions = DefinationDataProvider < HLSLCGFunction > . ProvideFromFile ( Path . Combine ( currentAssemblyDir , ShaderlabDataManager . HLSL_CG_FUNCTION_DEFINATIONFILE ) ) ;
74
75
75
76
List < HLSLCGKeywords > hlslcgKeywords = DefinationDataProvider < HLSLCGKeywords > . ProvideFromFile ( Path . Combine ( currentAssemblyDir , ShaderlabDataManager . HLSL_CG_KEYWORD_DEFINATIONFILE ) ) ;
0 commit comments