Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Any hidden event locations for object tracking?

Discussion in 'Editor & General Support' started by Digika, Sep 8, 2020.

  1. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    69
    For very deep debug purposes at Runtime, I need to track EVERY.SINGLE.ONE UnityEngine.Object (GameObject) creation. Problem is, hooking up to internal Instantiate method will only get me results called from managed domain. I need every single one, even the ones that are instantiated when scene loaded.

    Unity is full of such hidden super-useful stuff that is never mentioned anywhere. Does anyone know if there is something I can expose? Will have to resort to patching the original player binary via Ghidra but I need to know what exactly to look for.
     
  2. FredMoreau

    FredMoreau

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    23
    Why patching the original Player when you can create your very own from the sources we share as part of the Reflect package (available in Package Manager) and giving you access to object instantiation events ?
     
  3. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    69
    I'm confused, what sources? Unity's C++ backend is closed.
     
  4. FredMoreau

    FredMoreau

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    23
    Oh, maybe I'm mistaken. Is your question related to Reflect ?
     
  5. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    69
    No, sorry, no idea what Reflect is. In short, Unity knows when objects are crated an destroyed (regardless in which way it is, resource/scene load or manual), I want to tap into that power to get that info (at Runtime) and do some personal tracking.
     
  6. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    2,188
    Moving this to the general support area.
     
unityunity