yasirkula / UnityRuntimeInspector

Runtime Inspector and Hierarchy solution for Unity for debugging and runtime editing purposes
MIT License
1.68k stars 135 forks source link

RuntimeHierarchy AddToPsueDoScene Not working #1

Closed deltamish closed 6 years ago

deltamish commented 6 years ago

I followed the steps as you said. Dragged RuntimeHierarchy Prefab into my scene, Created A new Script with following code

` using System.Collections; using System.Collections.Generic; using UnityEngine; using RuntimeInspectorNamespace; public class RunTimeHirearchyHelper : MonoBehaviour {

public RuntimeHierarchy runtimeHierarchy; public Transform TestTransform; // Use this for initialization void Start () {

}

// Update is called once per frame
void Update () {
    runtimeHierarchy.AddToPseudoScene("Test scene",TestTransform);
}

}

The Test Psudescene is being created but the objects /children are empty and doesnt show anything

yasirkula commented 6 years ago

It actually works for me using the same code, that's weird. I've tested it on Unity 5.6.2f1. Which Unity version are you using?

ss

P.S. As a side note, it is sufficient to call AddToPseudoScene just once (maybe in the Start function).

deltamish commented 6 years ago

Hey,

I am using Unity Version 2018.1b

Haha yeah. since it was not coming I added it to Update. Hoping it would come

thanks

yasirkula commented 6 years ago

I was able to reproduce the issue on Unity 2017.3.0p2. It was caused by a bug in Unity UI. It can be resolved by changing Pos X of the HierarchyItemRoot-Content-ExpandToggle prefab. When Pos X is 0, you can't click the dropdown, when it is 0.001, you can. Strange, huh?

I'll update the package shortly.

yasirkula commented 6 years ago

Aaaand it's live! ^^