Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

How to define a drop down in C# script

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
hansanjie
Posts: 8
Joined: 27 Mar 2018, 04:33

How to define a drop down in C# script

Post by hansanjie » 29 Oct 2019, 02:48

I want to expose a enum perporty in my C# script input, by clicking the drop down,I can change or choose the perporty quickly, but i donot know how to define a drop down input;

also,i donot know how to set a default value outside the C# script, such as setting a integer 10 as default value,not 0;

does anybody knows ,please let me know, thank you! :)

stephen
Posts: 74
Joined: 06 Aug 2013, 14:11

Re: How to define a drop down in C# script

Post by stephen » 29 Oct 2019, 10:18

Hey,

you can do both by placing the Script inside a Content Container.

Use an Enumeration Node next to the Script Node and expose the Input property. By double clicking on the square in front of the property you can change its Name and Category on the Container. You can either bind the Enumeration's Output property to an Int Input of the Script or bind the Input property to a String Input of the Script.

When exposing an Integer Input Property of the Script you can again double click the square in front of it in the Property Editor to change its default value.

I know that this is a bit uncomfortable at the time.

Best
Stephen

hansanjie
Posts: 8
Joined: 27 Mar 2018, 04:33

Re: How to define a drop down in C# script

Post by hansanjie » 29 Oct 2019, 14:03

thank you so much ,i got it!

Post Reply