You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.6 KiB
37 lines
1.6 KiB
#if PPV2_EXISTS |
|
using UnityEditor.Search; |
|
using UnityEngine; |
|
using BIRPRendering = UnityEngine.Rendering.PostProcessing; |
|
|
|
namespace UnityEditor.Rendering.Universal.Converters |
|
{ |
|
static class PPv2ConversionIndexers |
|
{ |
|
// Note: Iterating this version number does not force an index rebuild. |
|
// If modifying this code, you will need to either delete the Library directory, |
|
// or open "Window > Search > Index Manager" and right-click each indexer to do a Force Rebuild. |
|
private const int Version = 10; |
|
|
|
[CustomObjectIndexer(typeof(Object), version = Version)] |
|
internal static void ConversionIndexer(CustomObjectIndexerTarget context, ObjectIndexer indexer) |
|
{ |
|
// Note: Volumes and Layers on the same object would still produce only a |
|
// single result in the "urp:convert-ppv2component" search, thus we only |
|
// explicitly add one or the other here, instead of both. |
|
if (context.targetType == typeof(BIRPRendering.PostProcessVolume)) |
|
{ |
|
indexer.AddProperty("urp", "convert-ppv2component", context.documentIndex); |
|
} |
|
else if (context.targetType == typeof(BIRPRendering.PostProcessLayer)) |
|
{ |
|
indexer.AddProperty("urp", "convert-ppv2component", context.documentIndex); |
|
} |
|
|
|
if (context.targetType == typeof(BIRPRendering.PostProcessProfile)) |
|
{ |
|
indexer.AddProperty("urp", "convert-ppv2scriptableobject", context.documentIndex); |
|
} |
|
} |
|
} |
|
} |
|
#endif
|
|
|