Skip to content

Commit 3661245

Browse files
committed
Fix WebGL build error from UPM path
1 parent a3c1f2f commit 3661245

File tree

7 files changed

+30
-27
lines changed

7 files changed

+30
-27
lines changed

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.0.10
2+
+ Fixed WebGL build error when Function is installed with Unity Package Manager.
3+
14
## 0.0.9
25
+ Added support for making on-device predictions on Android.
36
+ Added support for making on-device predictions on iOS.

Packages/ai.fxn.fxn3d/Editor/Build/WebGLBuildHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ internal sealed class WebGLBuildHandler : BuildHandler {
2424
};
2525
private static string FxncPath => _FxncPath = _FxncPath ?? AssetDatabase.GetAllAssetPaths()
2626
.Select(path => new FileInfo(Path.GetFullPath(path)).FullName)
27-
.FirstOrDefault(path => path.EndsWith(@"Web/libFunction.so"));
27+
.FirstOrDefault(path => path.EndsWith(@"Web/libFunction.so"))?
28+
.Replace(@"@", @"@@");
2829
private static string _FxncPath;
2930

3031
protected override BuildTarget target => BuildTarget.WebGL;
3132

3233
protected override Internal.FunctionSettings CreateSettings (BuildReport report) {
3334
// Set Emscripten args
3435
PlayerSettings.WebGL.emscriptenArgs = GetEmscriptenArgs();
35-
UnityEngine.Debug.Log(PlayerSettings.WebGL.emscriptenArgs);
3636
// Create settings
3737
var settings = FunctionProjectSettings.CreateSettings();
3838
// Return

Packages/ai.fxn.fxn3d/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add the following items to your Unity project's `Packages/manifest.json`:
1616
}
1717
],
1818
"dependencies": {
19-
"ai.fxn.fxn3d": "0.0.9"
19+
"ai.fxn.fxn3d": "0.0.10"
2020
}
2121
}
2222
```

Packages/ai.fxn.fxn3d/Runtime/Function.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public Function (
111111

112112
#region --Operations--
113113
public readonly IFunctionClient client;
114-
public const string Version = @"0.0.9";
114+
public const string Version = @"0.0.10";
115115
internal const string URL = @"https://api.fxn.ai";
116116
#endregion
117117
}

Packages/ai.fxn.fxn3d/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ai.fxn.fxn3d",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"displayName": "Function",
55
"description": "Run AI prediction functions in Unity Engine.",
66
"unity": "2022.3",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Add the following items to your Unity project's `Packages/manifest.json`:
1818
}
1919
],
2020
"dependencies": {
21-
"ai.fxn.fxn3d": "0.0.9"
21+
"ai.fxn.fxn3d": "0.0.10"
2222
}
2323
}
2424
```

UserSettings/Layouts/default-2022.dwlt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ MonoBehaviour:
1919
width: 1440
2020
height: 900
2121
m_ShowMode: 4
22-
m_Title: Hierarchy
22+
m_Title: Console
2323
m_RootView: {fileID: 2}
2424
m_MinSize: {x: 875, y: 300}
2525
m_MaxSize: {x: 10000, y: 10000}
@@ -121,7 +121,7 @@ MonoBehaviour:
121121
m_MinSize: {x: 400, y: 100}
122122
m_MaxSize: {x: 32384, y: 16192}
123123
vertical: 0
124-
controlID: 713
124+
controlID: 24
125125
--- !u!114 &6
126126
MonoBehaviour:
127127
m_ObjectHideFlags: 52
@@ -167,8 +167,8 @@ MonoBehaviour:
167167
y: 0
168168
width: 405.5
169169
height: 850
170-
m_MinSize: {x: 200, y: 200}
171-
m_MaxSize: {x: 4000, y: 4000}
170+
m_MinSize: {x: 202, y: 221}
171+
m_MaxSize: {x: 4002, y: 4021}
172172
m_ActualView: {fileID: 14}
173173
m_Panes:
174174
- {fileID: 14}
@@ -198,7 +198,7 @@ MonoBehaviour:
198198
m_MinSize: {x: 100, y: 100}
199199
m_MaxSize: {x: 8096, y: 16192}
200200
vertical: 1
201-
controlID: 1146
201+
controlID: 68
202202
--- !u!114 &9
203203
MonoBehaviour:
204204
m_ObjectHideFlags: 52
@@ -209,7 +209,7 @@ MonoBehaviour:
209209
m_Enabled: 1
210210
m_EditorHideFlags: 1
211211
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
212-
m_Name: SceneHierarchyWindow
212+
m_Name: ConsoleWindow
213213
m_EditorClassIdentifier:
214214
m_Children: []
215215
m_Position:
@@ -218,14 +218,14 @@ MonoBehaviour:
218218
y: 0
219219
width: 323
220220
height: 373
221-
m_MinSize: {x: 202, y: 221}
221+
m_MinSize: {x: 102, y: 121}
222222
m_MaxSize: {x: 4002, y: 4021}
223-
m_ActualView: {fileID: 15}
223+
m_ActualView: {fileID: 16}
224224
m_Panes:
225225
- {fileID: 15}
226226
- {fileID: 16}
227-
m_Selected: 0
228-
m_LastSelected: 1
227+
m_Selected: 1
228+
m_LastSelected: 0
229229
--- !u!114 &10
230230
MonoBehaviour:
231231
m_ObjectHideFlags: 52
@@ -871,9 +871,9 @@ MonoBehaviour:
871871
m_SceneHierarchy:
872872
m_TreeViewState:
873873
scrollPos: {x: 0, y: 0}
874-
m_SelectedIDs: 62790000
875-
m_LastClickedID: 31074
876-
m_ExpandedIDs: 985cffffec5cffff505effff7c6affffd06affff346cffff1679ffff6a79ffffd47affffd68affff2a8bffff988cffff8e99ffffe299ffff509bffff1aa7ffff6ea7ffffd6a8ffff0cb0ffff60b0ffffc8b1ffff32baffff86baffffeebbffff68c3ffffbcc3ffff24c5ffff4ecdffffa2cdffff0acfffff96d4ffffead4ffff5cd6ffffecdeffff40dfffffa8e0ffffa8e5fffffce5ffff42e7ffff74ecffffc8ecffff30eeffffe4f6ffff38f7ffffa0f8ffff30fbffff
874+
m_SelectedIDs:
875+
m_LastClickedID: 0
876+
m_ExpandedIDs: f8e5ffff4ce6ffffb0e7ffff24edffff78edffffdceeffffd4f3ffff28f4ffff96f5ffff30fbffff
877877
m_RenameOverlay:
878878
m_UserAcceptedRename: 0
879879
m_Name:
@@ -976,24 +976,24 @@ MonoBehaviour:
976976
m_SkipHidden: 0
977977
m_SearchArea: 1
978978
m_Folders:
979-
- Assets/Tests/Runtime
979+
- Packages/ai.fxn.fxn3d
980980
m_Globs: []
981981
m_OriginalText:
982982
m_ImportLogFlags: 0
983983
m_FilterByTypeIntersection: 0
984984
m_ViewMode: 1
985985
m_StartGridSize: 64
986986
m_LastFolders:
987-
- Assets/Tests/Runtime
987+
- Packages/ai.fxn.fxn3d/folder@1.0
988988
m_LastFoldersGridSize: -1
989989
m_LastProjectPath: /Users/yusuf/Documents/Projects/fxnai/fxn3d
990990
m_LockTracker:
991991
m_IsLocked: 0
992992
m_FolderTreeState:
993993
scrollPos: {x: 0, y: 175}
994-
m_SelectedIDs: 6c720000
995-
m_LastClickedID: 29292
996-
m_ExpandedIDs: 00000000585b0000625b00006c5b00008c5b000000ca9a3bffffff7f
994+
m_SelectedIDs: 505b0000
995+
m_LastClickedID: 23376
996+
m_ExpandedIDs: 000000004e5b0000505b0000525b00005c5b0000965b000000ca9a3bffffff7f
997997
m_RenameOverlay:
998998
m_UserAcceptedRename: 0
999999
m_Name:
@@ -1021,7 +1021,7 @@ MonoBehaviour:
10211021
scrollPos: {x: 0, y: 0}
10221022
m_SelectedIDs:
10231023
m_LastClickedID: 0
1024-
m_ExpandedIDs: 00000000585b00006c5b00008c5b000000ca9a3bffffff7f
1024+
m_ExpandedIDs: 000000004e5b0000505b0000525b0000
10251025
m_RenameOverlay:
10261026
m_UserAcceptedRename: 0
10271027
m_Name:
@@ -1048,7 +1048,7 @@ MonoBehaviour:
10481048
m_ListAreaState:
10491049
m_SelectedInstanceIDs:
10501050
m_LastClickedInstanceID: 0
1051-
m_HadKeyboardFocusLastEvent: 1
1051+
m_HadKeyboardFocusLastEvent: 0
10521052
m_ExpandedInstanceIDs: c6230000
10531053
m_RenameOverlay:
10541054
m_UserAcceptedRename: 0
@@ -1065,7 +1065,7 @@ MonoBehaviour:
10651065
m_IsRenaming: 0
10661066
m_OriginalEventType: 11
10671067
m_IsRenamingFilename: 1
1068-
m_ClientGUIView: {fileID: 10}
1068+
m_ClientGUIView: {fileID: 0}
10691069
m_CreateAssetUtility:
10701070
m_EndAction: {fileID: 0}
10711071
m_InstanceID: 0

0 commit comments

Comments
 (0)