I'm building a VR application in oculus where users can design their homes with furniture, flooring, paints, etc by wearing a VR headset. Will this package be of any use to me? or is this only a plugin for designing in unity editor?
Building a VR application
shivankar it's a plugin to build a standalone app (desktop, mobile, web etc) it's not just for the Unity Editor.
You can use it as a framework to create rooms in real time procedurally, now all the VR inputs have to be done on your side. Only the mouse/keyboard inputs are integrated in the demo scenes
I've tried building it for oculus with vr mappings. It works fine but it is unable to fetch floormaps and prefabs which are accessed on runtime in the gamescene. Do I have to change any of the scripts for it? or
do I have to add any of the folders from Exoa directory to my oculus manually?
Its the same for android build as well. All the touch inputs work fine but
Square and L room floormaps and their thumbnails are not getting rendered on clicking create "create new project button".
Anthony
Also I tried adding custom debug.log() statements to understand what is happening. But adb logcat doesn't show them. But when I deleted canvas and all other elements from scene and just kept a camera then the debug.Log() messages are being displayed. What might be the reason for this?
- Edited
shivankar this plugin does not support mobile at the moment unfortunately, I'm focusing on desktop right now.
I've still tried to build for Android and indeed the floor map files are not listing, and the debug logs are not showing up in the adb logcat console.
To enable the debug logs remove this code in BuildOptions.cs, or add DEBUG_MODE in your compilation variables in the Player Settings:
#if !UNITY_EDITOR
Debug.unityLogger.logEnabled = DEBUG_MODE;
#endif
And here is the crash report I've got, and that you will be able to see after enabling the logs:
Uploading Crash Report
UnauthorizedAccessException: Access to the path "/data/app/~~0-AyAQCtkT9k7-MkdlPkXw==/com.test.LevelBuilder-wZhe24YXfBXSTA0-8-Jp7A==/base.apkEmbeddedFloorMaps/" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0004b] in at System.IO.Directory.CreateDirectory (System.String path) [0x00094] in <44afb4564e9347cf99a1865351ea8f4a>:0
at Exoa.Designer.SaveSystem.GetBasePath (System.String subFolder) [0x00053] in D:\UNITY\UNITY - PROJECTS - UNITY2019\AssetStore_HomeDesigner_Bundle\Assets\Exoa\Common\Scripts\Saving\SaveSystem.cs:48
at Exoa.Designer.SaveSystem.ListFileItems (System.String subFolderName, System.Action`1[T] pCallback, System.String ext) [0x000b5] in D:\UNITY\UNITY - PROJECTS - UNITY2019\AssetStore_HomeDesigner_Bundle\Assets\Exoa\Common\Scripts\Saving\SaveSystem.cs:269
at Exoa.Designer.UIFloorMapSelector.GetFileList (System.String arg) [0x0001d] in D:\UNITY\UNITY - PROJECTS - UNITY2019\AssetStore_HomeDesigner_Bundle\
In SaveSystem.cs, there is a part trying to create a directory on the device, that doesn't work on Android (an extra / might be missing?). You can surround that code with a try/catch or #if UNITY_DESKTIOP for example:
try
{
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
}
catch (Exception e)
{
Debug.LogError("Could not create folder:" + e.Message);
}
I hope that helps, keep me posted!
thanks
- Edited
thanks for the reply. The debug logger works fine.
Actually I changed get base path function in savesystem.cs and it is working fine, but I had to add contents of the resources folder to my android manually. But every asset is visible twice.
Adding screenshots of code and gamewindow.
Gamewindow:
https://imgur.com/a/PykSwa9
all the appliances and even l room floormaps are visible twice.
code:
https://imgur.com/a/dWbTH2j
I just changed the path to persistent datapath as in android it refers it packagename/files folder and added resources content to it
- Edited
shivankar you should not add any content manually to your android folder. Just keep everything in resources/
some code will grab files from the Resources folder AND the external folder like in UIFloorMapSelector->GetFileList()
public void GetFileList(string arg = null)
{
SaveSystem.Create(SaveSystem.Mode.FILE_SYSTEM).ListFileItems(HDSettings.EXT_FLOORMAP_FOLDER, (SaveSystem.FileList l) =>
{
List<string> bothLists = (l.list);
if (l.list == null)
bothLists = new List<string>();
SaveSystem.Create(SaveSystem.Mode.RESOURCES).ListFileItems(HDSettings.EMBEDDED_FLOORMAP_FOLDER, (SaveSystem.FileList internalList) =>
{
if (internalList.list != null)
{
bothLists.AddRange(internalList.list);
}
OnFileListChange(bothLists);
});
});
}
As you mentioned I was getting this error when I surrounded it with a try/catch block.
11-03 19:16:07.930 6492 6520 E Unity : Could not create folder:Access to the path '/data/app/com.DefaultCompany.Multiplayer-RCPMd7EapO-EQh-dhGuUBA==/base.apkEmbeddedFloorMaps/' is denied.
1, String)
11-03 19:16:07.930 6492 6520 E Unity : Exoa.Designer.SaveSystem:GetBasePath(String)
11-03 19:16:07.930 6492 6520 E Unity : Exoa.Designer.SaveSystem:ListFileItems(String, Action
11-03 19:16:07.930 6492 6520 E Unity : Exoa.Designer.SaveSystem:ListFileItems(String, Action1, String)
Any workaround for this?