Exploring Reflection - Unity Observer - Part 3 @WorldOfZeroDevelopment
Exploring Reflection - Unity Observer - Part 3  @WorldOfZeroDevelopment
Uploaded May 2018 | Updated November 2026, 3 hours ago
Returning to Unity Observer, a project that enables you to easily analyze data in bulk from your Unity scenes. This time we're going to dive into taking advantage of C#'s reflection and how we can use it to expand the fields we can modify. To start we'll look into making it possible to edit other Vector3 fields on the Transform component attached to each Game Object.

The process for solving this takes place in a few steps. First we will add a text box that allows us to search for the property or field we want to observe. Then we will need to reflect over the component we're inspecting (for now this is hard coded to the Transform component) and attempt to find a field or property that shares the name that was provided. Once we have that we will need to verify that the field/property is of the Vector3 type. For now we only support Vector3's. Once we have a valid Vector3 field or property we can display its current value to in the existing Editor UI and expose it for editing.

By the end of this implementation we'll be able to find, view and edit any Vector3 member on a Transform component. Some examples of this include `position`, `localPosition` and `localScale`.

Join the World of Zero Discord channel: discord.gg/hU5Kq2u

Thumbnail Image Credits:
By Brocken Inaglory [GFDL (gnu.org/copyleft/fdl.html) or CC BY-SA 4.0 (creativecommons.org/licenses/by-sa/4.0)], from Wikimedia Commons
commons.wikimedia.org/wiki/File:Reflection_in_a_soap_bubble.jpg
Exploring Reflection - Unity Observer - Part 3Handling 3rd Person Camera Physics with SphereCastsQuickly Trim Video Snippets on the Command Line with FFmpegCreating a Quick Custom Profile in the Windows TerminalDemoing the Tool and Adding Command History - LINQ for Unity Stream - Part 2Im Learning Moq - A .NET Mocking Framework for Unit TestsA Static Glowing Ring - Ripple Shader - Part 1Dependency Injection in SpringInline Initializing C# Lists - Quick TipRecreating Particle Effects with Game Objects in Unity 3DBuilding a Custom Node in Unitys Shader GraphRuntime C# Scripting in Unity UI - The Roslyn Compiler in Unity
World of Zero |

Exploring Reflection - Unity Observer - Part 3

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER