private static void SetupARFoundationDemoPlane()
        {
            var defaultPlanePrefab = CustomEditorExtensions.FindOrCreatePrefabFromAssetMenu(defaultPlaneName,
                                                                                            defaultPlaneMenuPath, defaultPlanePrefabPath);

            var sessionOrigin = GameObject.Find(sessionOriginName);

            var planeManager = sessionOrigin.AddOrGetComponent <ARPlaneManager>();

            planeManager.planePrefab = AssetDatabase.LoadAssetAtPath <GameObject>(defaultPlanePrefabPath);
        }
Exemple #2
0
            public void FindOrCreate3DCubePrefab()
            {
                var asset = AssetDatabase.LoadAssetAtPath <GameObject>(gameObjectPrefabPath);

                Assert.IsNull(asset);

                asset = CustomEditorExtensions.FindOrCreatePrefabFromAssetMenu(gameObjectName, gameObjectMenuPath, gameObjectPrefabPath);

                Assert.IsNotNull(asset);

                asset = AssetDatabase.LoadAssetAtPath <GameObject>(gameObjectPrefabPath);

                Assert.IsNotNull(asset);
            }