From aa919a17df2a6203ce42ab2e4700c255936f940a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Je=CC=81re=CC=81my=20Lacoche?= <jeremy.lacoche@orange.com>
Date: Sun, 2 Mar 2025 21:24:55 +0100
Subject: [PATCH] New way to compute world pose with grapheditorwindow (remove
 old way with classic editor), color code for trabckable and anchors

---
 Editor/Scripts/Windows/GraphEditorWindow.cs   | 116 +++++++++++++++++-
 Editor/Scripts/Windows/WorldAnchorWindow.cs   |   2 +
 Editor/Scripts/Windows/WorldLinkWindow.cs     |   5 +-
 Runtime/Prefabs/ARFTrackable.prefab           |  62 +++++++---
 Runtime/Prefabs/ARFWorldAnchor.prefab         |  62 +++++++---
 .../GraphEditor/AttachToWorldAnchor.cs        |  29 -----
 .../GraphEditor/AttachToWorldAnchor.cs.meta   |  11 --
 7 files changed, 214 insertions(+), 73 deletions(-)
 delete mode 100644 Runtime/Scripts/GraphEditor/AttachToWorldAnchor.cs
 delete mode 100644 Runtime/Scripts/GraphEditor/AttachToWorldAnchor.cs.meta

diff --git a/Editor/Scripts/Windows/GraphEditorWindow.cs b/Editor/Scripts/Windows/GraphEditorWindow.cs
index 3066eba..e590a31 100644
--- a/Editor/Scripts/Windows/GraphEditorWindow.cs
+++ b/Editor/Scripts/Windows/GraphEditorWindow.cs
@@ -30,6 +30,9 @@ using ETSI.ARF.WorldStorage.Editor.Graph;
 using ETSI.ARF.OpenAPI.WorldStorage;
 using System.Collections.ObjectModel;
 using UnityEngine.UIElements;
+using TMPro;
+using UnityEditor.Experimental.GraphView;
+using System.Drawing.Drawing2D;
 
 namespace ETSI.ARF.WorldStorage.Editor.Windows
 {
@@ -250,7 +253,13 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows
 
                     GUILayout.EndHorizontal();
                 }
-
+                if (GUILayout.Button("Generate/Update GameObject"))
+                {
+                    Vector3 position ;
+                    Vector3 rotation ;
+                    EstimateWorldPose(worldAnchorNode, out position, out rotation);
+                    GenerateAndUpdateVisual(worldAnchor.UUID.ToString(), "Anchor: " + worldAnchor.Name, position, rotation, false); // Todo : localCRS does not correspond to world pos
+                }
                 //
                 //ELEMENT PARAMETERS
                 //
@@ -259,6 +268,7 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows
 
                 //uuid
                 EditorGUILayout.BeginHorizontal();
+                
                 EditorGUILayout.LabelField("UUID ", EditorStyles.boldLabel, GUILayout.Width(50));
                 if (!SaveInfo.instance.nodePositions.ContainsKey(worldAnchor.UUID.ToString()))
                 {
@@ -594,14 +604,26 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows
                     GUILayout.EndHorizontal();
                 }
 
+                if (GUILayout.Button("Generate/Update GameObject"))
+                {
+                    Vector3 position ;
+                    Vector3 rotation ;
+                    EstimateWorldPose(trackableNode, out position, out rotation);
+                    Debug.Log("Position " +position);
+                    GenerateAndUpdateVisual(trackable.UUID.ToString(), "Trackable: "+ trackable.TrackableType + "  "+ trackable.Name, position, rotation, true); // Todo : localCRS does not correspond to world pos
+                }
+
                 //
                 //ELEMENT PARAMETERS
                 //
-
+        
                 EditorGUI.BeginChangeCheck();
 
                 //uuid
                 EditorGUILayout.BeginHorizontal();
+
+                
+
                 EditorGUILayout.LabelField("UUID ", EditorStyles.boldLabel, GUILayout.Width(50));
                 if (!SaveInfo.instance.nodePositions.ContainsKey(trackable.UUID.ToString()))
                 {
@@ -1306,7 +1328,95 @@ namespace ETSI.ARF.WorldStorage.Editor.Windows
         }
 
 
-       
+        public static GameObject GenerateAndUpdateVisual(string UUID, string name, Vector3 pos, Vector3 rot, bool isTrackable /* else anchor */)
+        {
+            ETSI.ARF.WorldStorage.UI.Prefabs.WorldStoragePrefabs prefabs;
+            prefabs = (ETSI.ARF.WorldStorage.UI.Prefabs.WorldStoragePrefabs)Resources.Load("ARFPrefabs");
+            GameObject arf = GameObject.Find("ARF Visuals");
+            GameObject visual = GameObject.Find(UUID);
+
+            if (arf == null) arf = new GameObject("ARF Visuals");
+            if (visual == null)
+            {
+                GameObject typePrefaf = prefabs.trackablePrefab ;
+                if (!isTrackable)
+                {
+                    typePrefaf = prefabs.worldAnchorPrefab ;
+                }
+
+                visual = SceneAsset.Instantiate<GameObject>(typePrefaf, pos, Quaternion.Euler(rot), arf.transform); 
+                visual.name = UUID;
+            }
+            else
+            {
+                visual.transform.SetPositionAndRotation(pos, Quaternion.Euler(rot));
+            }
+
+
+            visual.transform.Find("Canvas/Text").GetComponent<TextMeshProUGUI>().text = $"Name: { name }\nUUID: { UUID }";
+            return visual;
+        }
+        
+        /// Here is an approach to estimate the world pose of a node
+        /// It goes map depth and multiply the matrix of each link until it finds the last node considered as the origin (0, 0 ,0)
+        /// This is not the optimal method as it can create inconsistencies
+        /// A better approach would be to set the world poses of the nodes and then compute the matrix of the world links
+        private void EstimateWorldPose(ARFNode node, out Vector3 pos, out Vector3 rot)
+        {
+           // trackable
+           int newNDepth = 0 ;
+           Matrix4x4 mat = Matrix4x4.identity ;
+           ComputePose(node, ref mat , ref newNDepth);
+
+            Vector3 translation = mat.GetColumn(3);
+            // Extract Rotation
+            Quaternion rotation = Quaternion.LookRotation(
+            mat.GetColumn(2),
+            mat.GetColumn(1)
+             );
+
+            pos = translation;
+            rot = rotation.eulerAngles;
+        }
+
+        private void ComputePose(ARFNode node, ref Matrix4x4 mat , ref int depth)
+        {
+            int maxDepth = 0 ;
+
+            foreach(Edge edge in node.portIn.connections)
+            {
+                ARFEdgeLink arfEdge = (ARFEdgeLink) edge ;
+                if (arfEdge !=null)
+                {
+                    WorldLink link =  arfEdge.worldLink ;
+                    ARFNode newNode = (ARFNode) arfEdge.output.node ;
+                    int currentDepth = 1 ;
+                    ComputePose(newNode, ref mat ,ref currentDepth);
+                    if (currentDepth > maxDepth)
+                    {
+                        Matrix4x4 newMat = GetMatrix(link.Transform); 
+                        mat = mat * newMat ;
+                        ARFNodeTrackable trackNode =  newNode as ARFNodeTrackable;
+                        ARFNodeWorldAnchor worldNode = newNode as ARFNodeWorldAnchor;
+                        maxDepth = currentDepth ;
+                    }
+                }
+            }
+            depth += maxDepth ;
+        }
+
+        private Matrix4x4 GetMatrix(Transform3D tr)
+        {
+             Matrix4x4 matrix = new Matrix4x4();
 
+            for (int row = 0; row < 4; row++)
+            {
+                for (int col = 0; col < 4; col++)
+                {
+                    matrix[row, col] = tr[row * 4 + col];
+                }
+            }
+            return matrix ;
+        }
     }
 }
\ No newline at end of file
diff --git a/Editor/Scripts/Windows/WorldAnchorWindow.cs b/Editor/Scripts/Windows/WorldAnchorWindow.cs
index a7bd07a..74a567e 100644
--- a/Editor/Scripts/Windows/WorldAnchorWindow.cs
+++ b/Editor/Scripts/Windows/WorldAnchorWindow.cs
@@ -198,10 +198,12 @@ namespace ETSI.ARF.WorldStorage.UI
             GUI.backgroundColor = ori;
 
             GUI.backgroundColor = WorldStorageWindow.arfColors[5];
+            /* wrong way to comptute world pos : remove for now
             if (GUILayout.Button("Generate/Update GameObject"))
             {
                 GenerateAndUpdateVisual(UUID, customName, localCRS_pos, localCRS_rot);
             }
+            */
             GUI.backgroundColor = ori;
             EditorGUILayout.EndHorizontal();
             EditorGUILayout.Space();
diff --git a/Editor/Scripts/Windows/WorldLinkWindow.cs b/Editor/Scripts/Windows/WorldLinkWindow.cs
index 99cf17f..0e66805 100644
--- a/Editor/Scripts/Windows/WorldLinkWindow.cs
+++ b/Editor/Scripts/Windows/WorldLinkWindow.cs
@@ -307,10 +307,11 @@ namespace ETSI.ARF.WorldStorage.UI
             GUI.backgroundColor = ori;
 
             GUI.backgroundColor = WorldStorageWindow.arfColors[5];
-            if (GUILayout.Button("Generate/Update GameObject"))
+           /* wrong way to comptute world pos : remove for now 
+           if (GUILayout.Button("Generate/Update GameObject"))
             {
                 GenerateAndUpdateVisual(UUID, FROM, TO);
-            }
+            }*/
             GUI.backgroundColor = ori;
             EditorGUILayout.EndHorizontal();
             EditorGUILayout.Space();
diff --git a/Runtime/Prefabs/ARFTrackable.prefab b/Runtime/Prefabs/ARFTrackable.prefab
index 678ddae..a5adf74 100644
--- a/Runtime/Prefabs/ARFTrackable.prefab
+++ b/Runtime/Prefabs/ARFTrackable.prefab
@@ -23,6 +23,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1239500166128132140}
+  serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
@@ -31,7 +32,6 @@ Transform:
   - {fileID: 4532241398218188797}
   - {fileID: 33536572583887604}
   m_Father: {fileID: 0}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1389085265039543899
 GameObject:
@@ -59,13 +59,13 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1389085265039543899}
+  serializedVersion: 2
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0.1, z: 0}
   m_LocalScale: {x: 0.020000001, y: 0.05, z: 0.020000001}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 4532241398218188797}
-  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!33 &8839914115087242523
 MeshFilter:
@@ -125,8 +125,17 @@ CapsuleCollider:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1389085265039543899}
   m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
   m_IsTrigger: 0
+  m_ProvidesContacts: 0
   m_Enabled: 1
+  serializedVersion: 2
   m_Radius: 0.5000001
   m_Height: 2
   m_Direction: 1
@@ -157,13 +166,13 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1687101261560852242}
+  serializedVersion: 2
   m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
   m_LocalPosition: {x: 0, y: 0, z: 0.1}
   m_LocalScale: {x: 0.020000001, y: 0.05000001, z: 0.019999998}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 4532241398218188797}
-  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
 --- !u!33 &6822513350628080072
 MeshFilter:
@@ -223,8 +232,17 @@ CapsuleCollider:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1687101261560852242}
   m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
   m_IsTrigger: 0
+  m_ProvidesContacts: 0
   m_Enabled: 1
+  serializedVersion: 2
   m_Radius: 0.5000001
   m_Height: 2
   m_Direction: 1
@@ -255,13 +273,13 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1823986580348874447}
+  serializedVersion: 2
   m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068}
   m_LocalPosition: {x: 0.1, y: 0, z: 0}
   m_LocalScale: {x: 0.019999998, y: 0.05000001, z: 0.020000001}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 4532241398218188797}
-  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
 --- !u!33 &5158975352210721371
 MeshFilter:
@@ -321,8 +339,17 @@ CapsuleCollider:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1823986580348874447}
   m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
   m_IsTrigger: 0
+  m_ProvidesContacts: 0
   m_Enabled: 1
+  serializedVersion: 2
   m_Radius: 0.5000001
   m_Height: 2
   m_Direction: 1
@@ -358,7 +385,6 @@ RectTransform:
   m_ConstrainProportionsScale: 1
   m_Children: []
   m_Father: {fileID: 33536572583887604}
-  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
@@ -404,8 +430,8 @@ MonoBehaviour:
   m_fontMaterials: []
   m_fontColor32:
     serializedVersion: 2
-    rgba: 4294967295
-  m_fontColor: {r: 1, g: 1, b: 1, a: 1}
+    rgba: 4278245631
+  m_fontColor: {r: 1, g: 0.84843576, b: 0, a: 1}
   m_enableVertexGradient: 0
   m_colorMode: 3
   m_fontColorGradient:
@@ -495,7 +521,6 @@ RectTransform:
   m_ConstrainProportionsScale: 1
   m_Children: []
   m_Father: {fileID: 33536572583887604}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
@@ -539,8 +564,8 @@ MonoBehaviour:
   m_fontMaterials: []
   m_fontColor32:
     serializedVersion: 2
-    rgba: 4294967295
-  m_fontColor: {r: 1, g: 1, b: 1, a: 1}
+    rgba: 4278245631
+  m_fontColor: {r: 1, g: 0.84843576, b: 0, a: 1}
   m_enableVertexGradient: 0
   m_colorMode: 3
   m_fontColorGradient:
@@ -622,6 +647,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8182691244837652424}
+  serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
@@ -632,7 +658,6 @@ Transform:
   - {fileID: 788171341007892784}
   - {fileID: 377487265314945344}
   m_Father: {fileID: 1814829793678878270}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &8225488253825437761
 GameObject:
@@ -660,13 +685,13 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8225488253825437761}
+  serializedVersion: 2
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
   m_ConstrainProportionsScale: 1
   m_Children: []
   m_Father: {fileID: 4532241398218188797}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!33 &8225488253825437764
 MeshFilter:
@@ -726,9 +751,17 @@ BoxCollider:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8225488253825437761}
   m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
   m_IsTrigger: 0
+  m_ProvidesContacts: 0
   m_Enabled: 1
-  serializedVersion: 2
+  serializedVersion: 3
   m_Size: {x: 1, y: 1, z: 1}
   m_Center: {x: 0, y: 0, z: 0}
 --- !u!1 &8292506020522815698
@@ -765,7 +798,6 @@ RectTransform:
   - {fileID: 8156859587808685068}
   - {fileID: 2888022835692577799}
   m_Father: {fileID: 1814829793678878270}
-  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -789,7 +821,9 @@ Canvas:
   m_OverrideSorting: 0
   m_OverridePixelPerfect: 0
   m_SortingBucketNormalizedSize: 0
+  m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 25
+  m_UpdateRectTransformForStandalone: 0
   m_SortingLayerID: 0
   m_SortingOrder: 0
   m_TargetDisplay: 0
diff --git a/Runtime/Prefabs/ARFWorldAnchor.prefab b/Runtime/Prefabs/ARFWorldAnchor.prefab
index cea4dce..e77d9d6 100644
--- a/Runtime/Prefabs/ARFWorldAnchor.prefab
+++ b/Runtime/Prefabs/ARFWorldAnchor.prefab
@@ -31,7 +31,6 @@ RectTransform:
   m_ConstrainProportionsScale: 1
   m_Children: []
   m_Father: {fileID: 1497700213276983046}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
@@ -75,8 +74,8 @@ MonoBehaviour:
   m_fontMaterials: []
   m_fontColor32:
     serializedVersion: 2
-    rgba: 4294967295
-  m_fontColor: {r: 1, g: 1, b: 1, a: 1}
+    rgba: 4278190335
+  m_fontColor: {r: 1, g: 0, b: 0, a: 1}
   m_enableVertexGradient: 0
   m_colorMode: 3
   m_fontColorGradient:
@@ -158,6 +157,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1525499792725534490}
+  serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
@@ -168,7 +168,6 @@ Transform:
   - {fileID: 7950346510699467234}
   - {fileID: 7032495084649945490}
   m_Father: {fileID: 9046317383172441836}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1622323168209334419
 GameObject:
@@ -196,13 +195,13 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1622323168209334419}
+  serializedVersion: 2
   m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
   m_ConstrainProportionsScale: 1
   m_Children: []
   m_Father: {fileID: 6503384942250313519}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
 --- !u!33 &1622323168209334422
 MeshFilter:
@@ -262,9 +261,17 @@ BoxCollider:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1622323168209334419}
   m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
   m_IsTrigger: 0
+  m_ProvidesContacts: 0
   m_Enabled: 1
-  serializedVersion: 2
+  serializedVersion: 3
   m_Size: {x: 1, y: 1, z: 1}
   m_Center: {x: 0, y: 0, z: 0}
 --- !u!1 &4529171925897838154
@@ -298,7 +305,6 @@ RectTransform:
   m_ConstrainProportionsScale: 1
   m_Children: []
   m_Father: {fileID: 1497700213276983046}
-  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
@@ -344,8 +350,8 @@ MonoBehaviour:
   m_fontMaterials: []
   m_fontColor32:
     serializedVersion: 2
-    rgba: 4294967295
-  m_fontColor: {r: 1, g: 1, b: 1, a: 1}
+    rgba: 4278190335
+  m_fontColor: {r: 1, g: 0, b: 0, a: 1}
   m_enableVertexGradient: 0
   m_colorMode: 3
   m_fontColorGradient:
@@ -430,13 +436,13 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8344222362070912960}
+  serializedVersion: 2
   m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
   m_LocalPosition: {x: 0, y: 0, z: 0.1}
   m_LocalScale: {x: 0.020000001, y: 0.05000001, z: 0.019999998}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6503384942250313519}
-  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
 --- !u!33 &4182441150992537882
 MeshFilter:
@@ -496,8 +502,17 @@ CapsuleCollider:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8344222362070912960}
   m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
   m_IsTrigger: 0
+  m_ProvidesContacts: 0
   m_Enabled: 1
+  serializedVersion: 2
   m_Radius: 0.5000001
   m_Height: 2
   m_Direction: 1
@@ -525,6 +540,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8473238451594182910}
+  serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
@@ -533,7 +549,6 @@ Transform:
   - {fileID: 6503384942250313519}
   - {fileID: 1497700213276983046}
   m_Father: {fileID: 0}
-  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &8638588117357457033
 GameObject:
@@ -561,13 +576,13 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8638588117357457033}
+  serializedVersion: 2
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0.1, z: 0}
   m_LocalScale: {x: 0.020000001, y: 0.05, z: 0.020000001}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6503384942250313519}
-  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!33 &2164195824166614473
 MeshFilter:
@@ -627,8 +642,17 @@ CapsuleCollider:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8638588117357457033}
   m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
   m_IsTrigger: 0
+  m_ProvidesContacts: 0
   m_Enabled: 1
+  serializedVersion: 2
   m_Radius: 0.5000001
   m_Height: 2
   m_Direction: 1
@@ -667,7 +691,6 @@ RectTransform:
   - {fileID: 4263110725940009300}
   - {fileID: 2044833251513730170}
   m_Father: {fileID: 9046317383172441836}
-  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -691,7 +714,9 @@ Canvas:
   m_OverrideSorting: 0
   m_OverridePixelPerfect: 0
   m_SortingBucketNormalizedSize: 0
+  m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 25
+  m_UpdateRectTransformForStandalone: 0
   m_SortingLayerID: 0
   m_SortingOrder: 0
   m_TargetDisplay: 0
@@ -761,13 +786,13 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 9076285480843021853}
+  serializedVersion: 2
   m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068}
   m_LocalPosition: {x: 0.1, y: 0, z: 0}
   m_LocalScale: {x: 0.019999998, y: 0.05000001, z: 0.020000001}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6503384942250313519}
-  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
 --- !u!33 &2539246307318246025
 MeshFilter:
@@ -827,8 +852,17 @@ CapsuleCollider:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 9076285480843021853}
   m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
   m_IsTrigger: 0
+  m_ProvidesContacts: 0
   m_Enabled: 1
+  serializedVersion: 2
   m_Radius: 0.5000001
   m_Height: 2
   m_Direction: 1
diff --git a/Runtime/Scripts/GraphEditor/AttachToWorldAnchor.cs b/Runtime/Scripts/GraphEditor/AttachToWorldAnchor.cs
deleted file mode 100644
index 852b8a7..0000000
--- a/Runtime/Scripts/GraphEditor/AttachToWorldAnchor.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace ETSI.ARF.WorldStorage.UI
-{
-    [ExecuteAlways]
-    public class AttachToWorldAnchor : MonoBehaviour
-    {
-        public GameObject worldAnchor;
-        public bool autoUpdate = true;
-
-        private void Update()
-        {
-            if (autoUpdate && worldAnchor != null)
-            {
-                transform.position = worldAnchor.transform.position;
-                transform.rotation = worldAnchor.transform.rotation;
-            }
-        }
-
-        void OnDrawGizmos()
-        {
-#if UNITY_EDITOR
-            // do something...
-#endif
-        }
-    }
-}
diff --git a/Runtime/Scripts/GraphEditor/AttachToWorldAnchor.cs.meta b/Runtime/Scripts/GraphEditor/AttachToWorldAnchor.cs.meta
deleted file mode 100644
index b568971..0000000
--- a/Runtime/Scripts/GraphEditor/AttachToWorldAnchor.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 53275cee00d69114f926dc2b69bb4e53
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
-- 
GitLab