Skip to content

Commit

Permalink
💥 pref!: Use RefrectionProbe tpye
Browse files Browse the repository at this point in the history
  • Loading branch information
esnya committed Apr 13, 2021
1 parent 6fa261e commit 97bfef7
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 60 deletions.
9 changes: 1 addition & 8 deletions Assets/UdonSunController/Scripts/PickupController.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
using UdonSharp;
using UdonToolkit;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
using VRC.Udon.Common.Interfaces;

#if UNITY_EDITOR && !COMPILER_UDONSHARP
using UdonSharpEditor;
using UnityEditor;
#endif

namespace EsnyaFactory.UdonSunController
{
[CustomName("Pickup Controller")]
Expand Down Expand Up @@ -53,7 +46,7 @@ public class PickupController : UdonSharpBehaviour
[ListView("OnDrop Target List")][Popup("behaviour", "onDropTargets", true)][UTEditor]
public string[] onDropEvents;


#endregion

#region Private Variables
Expand Down
36 changes: 0 additions & 36 deletions Assets/UdonSunController/Scripts/ReflectionProbeController.cs

This file was deleted.

27 changes: 27 additions & 0 deletions Assets/UdonSunController/Scripts/ReflectionProbeUpdater.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

using UdonSharp;
using UdonToolkit;
using UnityEngine;

namespace EsnyaFactory.UdonSunController
{
[CustomName("Reflection Probe Updater")]
[HelpMessage("Updates ReflectionProbe at runtime. Currently, only the \"RenderProbe\" event is available to update the in real-time mode.")]
public class ReflectionProbeUpdater : UdonSharpBehaviour
{
public ReflectionProbe reflectionProbe;
public bool renderOnStart;

void Start()
{
if (renderOnStart) RenderProbe();
}

public void RenderProbe()
{
if (reflectionProbe == null) return;
Debug.Log($"[{gameObject.name}] ReflectionProbe rendering");
reflectionProbe.RenderProbe();
}
}
}

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Assets/UdonSunController/SunController.prefab

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: ReflectionProbeController
m_Name: ReflectionProbeUpdater
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 0f573cf5c13741b4982dcd0b517ca042,
type: 2}
Expand Down Expand Up @@ -60,7 +60,7 @@ MonoBehaviour:
Data: 4|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
Data: UnityEngine.ReflectionProbe, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
Expand All @@ -72,7 +72,7 @@ MonoBehaviour:
Data: 0
- Name: symbolResolvedTypeName
Entry: 1
Data: UnityEngineGameObject
Data: UnityEngineReflectionProbe
- Name: symbolOriginalName
Entry: 1
Data: reflectionProbe
Expand Down Expand Up @@ -182,14 +182,8 @@ MonoBehaviour:
Entry: 7
Data: 11|UdonSharp.Compiler.SymbolDefinition, UdonSharp.Editor
- Name: internalType
Entry: 7
Data: 12|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.ReflectionProbe, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
Entry: 9
Data: 4
- Name: declarationType
Entry: 3
Data: 2
Expand All @@ -213,7 +207,7 @@ MonoBehaviour:
Data:
- Name: fieldAttributes
Entry: 7
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
Expand Down

0 comments on commit 97bfef7

Please sign in to comment.