realitycollective / realitytoolkit.dev

The development project for building the Reality Toolkit and its respective components
https://realitytoolkit.realitycollective.net/
MIT License
9 stars 0 forks source link

Create profile feature in framework inspector does not work #52

Closed FejZa closed 2 years ago

FejZa commented 2 years ago

Reality Collective - Reality Toolkit Bug Report

Describe the bug

The create profile '+' button in the framework inspector does not work in the latest public release. It throws an error when attempting to generate a profile for a service that is already added to the configuration:

NullReferenceException: Object reference not set to an instance of an object
RealityCollective.Editor.Extensions.ScriptableObjectExtensions.CreateAsset[T] (T scriptableObject, System.String path, System.String fileName, System.Boolean ping, System.Boolean unique) (at Library/PackageCache/com.realitycollective.utilities@1.0.0-preview.6/Editor/Extensions/ScriptableObjectExtensions.cs:47)
RealityCollective.Editor.Extensions.ScriptableObjectExtensions.CreateAsset[T] (T scriptableObject, System.String path, System.Boolean ping) (at Library/PackageCache/com.realitycollective.utilities@1.0.0-preview.6/Editor/Extensions/ScriptableObjectExtensions.cs:34)
RealityCollective.ServiceFramework.Editor.Utilities.BaseProfileInspectorExtensions.CreateNewProfileInstance (RealityCollective.ServiceFramework.Definitions.BaseProfile parentProfile, UnityEditor.SerializedProperty property, System.Type profileType, System.Boolean clone) (at Library/PackageCache/com.realitycollective.service-framework@1.0.0-preview.6/Editor/Extensions/BaseProfileInspectorExtensions.cs:51)

To Reproduce

Do what I said above.

Expected behavior

It generates a new profile.

Actual behavior

It generates an error.

Your Setup