realitycollective / com.realitycollective.service-framework

The Service Framework package components for the Reality Collective. This package an extensible service framework to build highly performant components for your Unity projects.
https://service-framework.realitycollective.net
MIT License
8 stars 4 forks source link

Make service profile type optional #63

Closed LocalJoost closed 10 months ago

LocalJoost commented 10 months ago

Reality Collective - Service Framework Feature Request

A service framework must have a profile even if it doesn't need one.

Exhibit A:

image

If I remove the profile from the constructor:

image

It disappears nicely from the UI:

image

But then unfortunately an error pops up in Unity:

Failed to register the MRTK3ConfigurationFindingService service: System.MissingMethodException - Constructor on type 'MRTKExtensions.Services.MRTK3ConfigurationFindingService' not found.

Not sure if this is a feature request or a bug, but I thought to leave here as a feature request anyway.

Using Service Framework version 1.0.3 and Utilities 1.0.5

SimonDarksideJ commented 10 months ago

If you do not want a profile, then set the profile type to "BaseProfile" and it will not be expected.

This is the default if you leave the checkbox for "profile required" unchecked when you generate the service.

LocalJoost commented 10 months ago

I really have a hard time believing I actually missed spotting this rather obvious checkbox. Never mind... image