-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] [AddTypeMenu]
with dynamic string value
#64
Comments
One another way would be to use additional |
[AddTypeMenu]
with dynamic string value
@Antoshidza [SerializeReference, SubclassSelector]
[ArrayDrawer(CustomLabel = "{LabelName}")]
public List<Item> items1 = new();
[SerializeReference, SubclassSelector]
[ArrayDrawer(CustomLabel = "{ToString()}")]
public List<Item> items2 = new();
[System.Serializable]
public class Item
{
public string LabelName;
public int Value;
public override string ToString () {
return LabelName;
}
} |
I'm talking not about customizing array drawing (which is also good way to enhance this package, but array drawing isn't a part of this package responsibilities), but about drawing selected subclass. In my example here it is "Composite Effect" which I'd rather would draw as "Draw card multiple" |
Is this what you want to do? [SerializeReference, SubclasSelector(useAsToStringAsName = true)]
public IEffect effect; |
Yep |
Functionality implemented. #74 |
Feature description
I have

IEffect
and some wrapper class likeCompositeEffect
which containsIEffect
andIProvider<int>
to repeat effect execution certain times. In editor it looks like this:And when it not expanded I see only
Element 1 Composite Effect
.It would be perfect if I could see something like:
Element 1 Composite Effect: Draw
/Element 1 Draw (composite)
/Element 1 Draw
.I think it could be down like Odin does in it's attributes, where we can specify method name to get
string
dynamically instead of specify const string value.The text was updated successfully, but these errors were encountered: