Skip to content

Commit

Permalink
fix AddScriptableObjectSingleton<T, TImpl> T type constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
amelkor committed May 7, 2023
1 parent a6143c0 commit a96a6c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface IUnityObjectServiceCollectionBuilder

IUnityObjectServiceCollectionBuilder AddScriptableObjectSingleton(ScriptableObject scriptableObject, Type type);
IUnityObjectServiceCollectionBuilder AddScriptableObjectSingleton<T>(T scriptableObject) where T : ScriptableObject;
IUnityObjectServiceCollectionBuilder AddScriptableObjectSingleton<T, TImpl>(TImpl scriptableObject) where T : ScriptableObject where TImpl : ScriptableObject, T;
IUnityObjectServiceCollectionBuilder AddScriptableObjectSingleton<T, TImpl>(TImpl scriptableObject) where T : class where TImpl : ScriptableObject, T;

IUnityObjectServiceCollectionBuilder AddMonoBehaviourPrefabSingleton<T>(string resourcesPath) where T : MonoBehaviour;
IUnityObjectServiceCollectionBuilder AddMonoBehaviourPrefabTransient<T>(string resourcesPath) where T : MonoBehaviour;
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Internals/UnityObjectServiceCollectionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public IUnityObjectServiceCollectionBuilder AddScriptableObjectSingleton<T>(T sc
return this;
}

public IUnityObjectServiceCollectionBuilder AddScriptableObjectSingleton<T, TImpl>(TImpl scriptableObject) where T : ScriptableObject where TImpl : ScriptableObject, T
public IUnityObjectServiceCollectionBuilder AddScriptableObjectSingleton<T, TImpl>(TImpl scriptableObject) where T : class where TImpl : ScriptableObject, T
{
_hostBuilder.ConfigureServices(services =>
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Microsoft.Extensions.Hosting adopted for Unity",
"unity": "2021.1",
"release": "0f1",
"version": "2.1.0-preview.4",
"version": "2.1.0-preview.5",
"keywords": [
"unity",
"integration",
Expand Down

0 comments on commit a96a6c6

Please sign in to comment.