Git Product home page Git Product logo

Comments (3)

Deadcows avatar Deadcows commented on June 12, 2024 1

@Vedrina I made this change. I will improve it a little bit later on, but it is pretty useful as it is.

Try the Update button in the MyBox Window. It won't show that there is a new version, but will grab the latest changes anyway.

For now, it is possible to use only with the methods returning arrays, so in your method simply put wordsDictionary.animalsWords.ToArray() at the end and change return type to string[].
[DefinedValues(nameof(GetNames))] public string name; should do just fine.

The code I used to test this new feature:

[DefinedValues(nameof(StringTest))] 
public string TestStrMethodPopup1;

[DefinedValues("Hello", "World")] 
public string TestStrPopup2;

[DefinedValues(.5f, 1f, 1.5f, 2f)] 
public float TestFloatPopup;

[DefinedValues(nameof(TransformTest))] 
public Transform TestTrMethodPopup;


private string[] StringTest() => new[] { "A", "B", "C" };

private Transform[] TransformTest()
{
    var childs = transform.GetChilds();
    childs.Insert(0, null);
    return childs.ToArray();
}

image

from mybox.

Deadcows avatar Deadcows commented on June 12, 2024

Really cool idea! It's not supported at the moment, but I already made initial working solution. Now I'm trying to make it possible to pass any objects suitable for the inspector with the method, like a popup of the filtered Transforms from the child objects 🤔

It may take a few days, since I'm on a vacation, but I really eager to make this improvement

from mybox.

Vedrina avatar Vedrina commented on June 12, 2024

My god you are fast. Thank you!

from mybox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.