Skip to content

Commit 5749f43

Browse files
committed
Update project to Unity 2018.2
- Update use of AssetDatabase.TryGetGUIDAndLocalFileIdentifier for 2018.2
1 parent 6d2f752 commit 5749f43

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

Assets/AssetDatabaseTalk/Scripts/LibraryMetadataColoriser.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ private void LateUpdate()
1919
Object currentObject = Selection.activeObject;
2020

2121
string guid;
22+
#if UNITY_2018_2
23+
long localID;
24+
#else
2225
int localID;
23-
26+
#endif
2427
if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(currentObject, out guid, out localID))
2528
{
2629
string metaStart = guid.Substring(0, 2);

Assets/AssetDatabaseTalk/Scripts/OpenCurrentMetatDataFile.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ public void OpenMetaDataFile()
88
Object currentObject = Selection.activeObject;
99
string currentObjectPath = AssetDatabase.GetAssetPath(currentObject);
1010
string guid;
11+
12+
#if UNITY_2018_2
13+
long localID;
14+
#else
1115
int localID;
16+
#endif
1217
if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(currentObject, out guid, out localID))
1318
{
1419
string metadataPath = AssetExplorerUtility.GetMetadataFilePathFromAssetGuid(guid);

Assets/AssetDatabaseTalk/Scripts/TextToCurrentAssetInfo.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ private static string CreateStringFromTemplate(string template, Object currentOb
9494
string result = template;
9595

9696
string guid;
97+
#if UNITY_2018_2
98+
long localID;
99+
#else
97100
int localID;
101+
#endif
98102
if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(currentObject, out guid, out localID))
99103
{
100104
result = result.Replace(kName, currentObject.name);

ProjectSettings/ProjectVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
m_EditorVersion: 2018.1.4f1
1+
m_EditorVersion: 2018.2.0f2

0 commit comments

Comments
 (0)