Skip to content

Instantly share code, notes, and snippets.

@AG-Dan
Created February 14, 2020 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AG-Dan/57594ba2e290fbf438797cd85dfeeb46 to your computer and use it in GitHub Desktop.
Save AG-Dan/57594ba2e290fbf438797cd85dfeeb46 to your computer and use it in GitHub Desktop.
using DunGen;
using DunGen.Adapters;
using UnityEngine;
public sealed class RenderReflectionProbesPostProcessing : BaseAdapter
{
protected override void Run(DungeonGenerator generator)
{
var reflectionProbes = generator.CurrentDungeon.GetComponentsInChildren<ReflectionProbe>();
foreach (var probe in reflectionProbes)
probe.RenderProbe();
}
}
@AG-Dan
Copy link
Author

AG-Dan commented Feb 14, 2020

How to use:

  1. Ensure the reflection probes in your rooms are set to 'Realtime' with 'Via scripting' as the refresh mode.
  2. Add the above component to the same object as your Runtime Dungeon.
  3. Make sure the priority for this post-processing step is higher than any culling adapters you're using - we want this code to run first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment