diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity index acf667cb..32160487 100644 --- a/Assets/Scenes/MainScene.unity +++ b/Assets/Scenes/MainScene.unity @@ -1780,6 +1780,7 @@ MonoBehaviour: - ../lgrs_resource/assets/models/ - ../../lgrs_resource/assets/models/ - ../sample_resources/All + - ../cloi_resources worldRootDirectories: - ../sample_resources/worlds/ - ../lgrs_resource/worlds/ diff --git a/Assets/Scripts/Main.cs b/Assets/Scripts/Main.cs index 1f184be1..378e5954 100644 --- a/Assets/Scripts/Main.cs +++ b/Assets/Scripts/Main.cs @@ -248,10 +248,11 @@ void Start() if (string.IsNullOrEmpty(newWorldFilename)) { newWorldFilename = GetArgument("-worldFile"); - if (!string.IsNullOrEmpty(newWorldFilename)) - { - worldFileName = newWorldFilename; - } + } + + if (!string.IsNullOrEmpty(newWorldFilename)) + { + worldFileName = newWorldFilename; } if (!doNotLoad && !string.IsNullOrEmpty(worldFileName)) @@ -438,12 +439,12 @@ private IEnumerator ResetSimulation() /// Eg: CLOiSim.x86_64 -worldFile lg_seocho.world /// read the "-worldFile" command line argument /// - private static string GetArgument(in string name) + private static string GetArgument(in string arg_name) { var args = Environment.GetCommandLineArgs(); for (var i = 0; i < args.Length; i++) { - if (args[i] == name && args.Length > i + 1) + if (args[i].CompareTo(arg_name) == 0 && args.Length > i + 1) { return args[i + 1]; } diff --git a/Assets/Scripts/Tools/SDF/Helper/Model.cs b/Assets/Scripts/Tools/SDF/Helper/Model.cs index 349fccc4..a32692a4 100644 --- a/Assets/Scripts/Tools/SDF/Helper/Model.cs +++ b/Assets/Scripts/Tools/SDF/Helper/Model.cs @@ -71,12 +71,14 @@ private void AddNavMeshObstalceForNonRobot() if (parentObject != null && parentObject.CompareTag("Collision")) { var navMeshObstacle = parentObject.gameObject.AddComponent(); - navMeshObstacle.carving = true; - navMeshObstacle.carveOnlyStationary = true; - navMeshObstacle.carvingMoveThreshold = CarvingMoveThreshold; - navMeshObstacle.carvingTimeToStationary = CarvingTimeToStationary; - - navMeshObstacle.size = transform.rotation * colliders[i].bounds.size; + if (navMeshObstacle != null) + { + navMeshObstacle.carving = true; + navMeshObstacle.carveOnlyStationary = true; + navMeshObstacle.carvingMoveThreshold = CarvingMoveThreshold; + navMeshObstacle.carvingTimeToStationary = CarvingTimeToStationary; + navMeshObstacle.size = transform.rotation * colliders[i].bounds.size; + } } } } diff --git a/Assets/Scripts/Tools/SDF/Import/Import.Sensor.cs b/Assets/Scripts/Tools/SDF/Import/Import.Sensor.cs index 3c0f4b2d..ff611ab2 100644 --- a/Assets/Scripts/Tools/SDF/Import/Import.Sensor.cs +++ b/Assets/Scripts/Tools/SDF/Import/Import.Sensor.cs @@ -28,15 +28,15 @@ protected override System.Object ImportSensor(in SDF.Sensor sensor, in System.Ob switch (sensorType) { case "ray": - Debug.LogWarning("It is preferred to use 'lidar' since 'ray' will be deprecated."); + Debug.LogWarning("[SDF.Import] It is preferred to use 'lidar' since 'ray' will be deprecated."); goto case "lidar"; case "lidar": - Debug.LogWarning("CPU based lidar or ray does not support. It will change to GPU based sensor."); + Debug.LogWarning("[SDF.Import] CPU based lidar or ray does not support. It will change to GPU based sensor."); goto case "gpu_lidar"; case "gpu_ray": - Debug.LogWarning("It is preferred to use 'gpu_lidar' since 'gpu_ray' will be deprecated."); + Debug.LogWarning("[SDF.Import] It is preferred to use 'gpu_lidar' since 'gpu_ray' will be deprecated."); goto case "gpu_lidar"; case "gpu_lidar": diff --git a/Assets/Scripts/UI/ActorControl.cs b/Assets/Scripts/UI/ActorControl.cs index bc0fca28..0740bd23 100644 --- a/Assets/Scripts/UI/ActorControl.cs +++ b/Assets/Scripts/UI/ActorControl.cs @@ -38,14 +38,17 @@ void LateUpdate() { if (Input.GetMouseButton(1)) { - Main.Gizmos.GetSelectedTargets(out var list); - - if (list.Count > 0) + if (Main.Gizmos != null) { - var ray = Camera.main.ScreenPointToRay(Input.mousePosition); - if (Physics.Raycast(ray.origin, ray.direction, out m_HitInfo)) + Main.Gizmos.GetSelectedTargets(out var list); + + if (list.Count > 0) { - ClickToMove(ref list); + var ray = Camera.main.ScreenPointToRay(Input.mousePosition); + if (Physics.Raycast(ray.origin, ray.direction, out m_HitInfo)) + { + ClickToMove(ref list); + } } } } diff --git a/Assets/Scripts/UI/AddModel.cs b/Assets/Scripts/UI/AddModel.cs index 62ab9dd8..053b035d 100644 --- a/Assets/Scripts/UI/AddModel.cs +++ b/Assets/Scripts/UI/AddModel.cs @@ -116,5 +116,13 @@ void LateUpdate() { HandlingAddedObject(); } + else + { + // close ADd model list + if (Input.GetKey(KeyCode.Escape)) + { + modelList.SetActive(false); + } + } } } \ No newline at end of file diff --git a/Assets/Scripts/UI/RuntimeGizmo/TransformGizmo.cs b/Assets/Scripts/UI/RuntimeGizmo/TransformGizmo.cs index 68cf5464..28b37384 100644 --- a/Assets/Scripts/UI/RuntimeGizmo/TransformGizmo.cs +++ b/Assets/Scripts/UI/RuntimeGizmo/TransformGizmo.cs @@ -145,7 +145,6 @@ void Update() // Clear Tagets when ESC if (Input.GetKey(KeyCode.Escape)) { - transformType = TransformType.Move; ClearTargets(); } } @@ -223,7 +222,7 @@ void SetSpaceAndType() { // avoid pressing left control if (!Input.GetKey(KeyCode.LeftControl)) - { + { if (Input.GetKeyUp(SetMoveType)) { transformType = TransformType.Move; diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 8d08fc55..3cb50efd 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -12,7 +12,7 @@ PlayerSettings: targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 - companyName: lge-arlab + companyName: LGE.CTO.ARLab productName: CLOiSim defaultCursor: {fileID: 2800000, guid: 8c59cc8e2487aff97b53248ea15b74c0, type: 3} cursorHotspot: {x: 3, y: 3} @@ -134,7 +134,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 2.7.0 + bundleVersion: 2.7.1 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -153,7 +153,7 @@ PlayerSettings: androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: - Standalone: com.lge-arlab.CLOiSim + Standalone: com.LGE.CTO.ARLab.CLOiSim buildNumber: Standalone: 0 iPhone: 0 diff --git a/README.md b/README.md index bf1e02ca..1a5f397d 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Here are the list of items that is implemented(marked) or planned to be implemen - [ ] supporting ``, ``, ``, ``, `` - [X] Spherical Coordinates -Plus, [SDF](http://sdformat.org/spec?ver=1.7) works on the essential elements such as ``, ``, ``, ``, ``, etc. +Plus, [SDF](http://sdformat.org/spec?ver=1.6) works on the essential elements such as ``, ``, ``, ``, ``, etc. It does not support optional elmenets like ``, `