Yes I would like to support old version users.
Sorry for inconvenience, I hope cool new features of new package will compensate that
(I made update on asset store for free)
using UnityEngine;
public class TestObject : MonoBehaviour
{
public SubObject MySubObject = new SubObject() { TestString = "Overriden String" };
public string MyTextString = "Hello, World!";
public class SubObject
{
public string TestString = "My Test String";
}
}
I can use a Text Binding to display MyTextString, but how do I display MySubObject.TestString?
Hi Tinjaw!
Unfortunately today fields of nested objects not supported.
You can do workaround with Collection binding (collection contains one element).
public class TestObject : MonoBehaviour
{
public SubObject MySubObject = new SubObject { TestString = "Overriden String" };
public IEnumerable<SubObject> MySubObjectProp
{
get { return new[] {MySubObject}; }
}
public class SubObject
{
public string TestString = "My Test String";
}
}
If this (acess to fields of nested objects) happens more less frequently in your project we can agree that I`ll improve package to support this usecase.
using UnityEngine;
public class TestObject : MonoBehaviour
{
public SubObject MySubObject = new SubObject() { TestString = "Overriden String" };
public string MyTextString = "Hello, World!";
public class SubObject
{
public string TestString = "My Test String";
}
public string MySubObject_TestString // just expose your subobject fields as properties
{
get { return MySubObject.TestString; }
set { MySubObject.TestString = value; }
}
}
Amazing asset, question. How can I have a script component, that’s attached to a player game object, enabled when the player enters a trigger area? Any help will be appreciated thanks.