initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
|
@ -0,0 +1,35 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
#if !UNITY_2019_2_OR_NEWER
|
||||
using UnityEngine.Experimental;
|
||||
#endif
|
||||
|
||||
#pragma warning disable CS0618
|
||||
namespace UnityEngine
|
||||
{
|
||||
public static class SubsystemRegistration
|
||||
{
|
||||
static readonly List<SubsystemDescriptor> k_SubsystemDescriptors = new List<SubsystemDescriptor>();
|
||||
|
||||
/// <summary>
|
||||
/// Registers a <c>SubsystemDescriptor</c> with the Subsystem Manager so that features and implementation type are available.
|
||||
/// </summary>
|
||||
/// <param name="descriptor"> The <c>SubsystemDescriptor</c> that describes the subsystem implementation.</param>
|
||||
/// <returns><c>True</c> if the descriptor does not already exist and registration happens, otherwise, <c>False</c>.</returns>
|
||||
public static bool CreateDescriptor(SubsystemDescriptor descriptor)
|
||||
{
|
||||
|
||||
foreach (var declaration in k_SubsystemDescriptors)
|
||||
{
|
||||
if (descriptor.subsystemImplementationType == declaration.subsystemImplementationType)
|
||||
return false;
|
||||
}
|
||||
|
||||
Internal_SubsystemDescriptors.Internal_AddDescriptor(descriptor);
|
||||
k_SubsystemDescriptors.Add(descriptor);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS0618
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4f1731c2f004b4287b1f333fba2da269
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Unity.Subsystem.Registration",
|
||||
"references": [],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d03624f02fd4aef4aa6b888a1b059ad7
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue