Skip to content
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

output string parameter #10

Open
arqtiq opened this issue Sep 4, 2018 · 3 comments
Open

output string parameter #10

arqtiq opened this issue Sep 4, 2018 · 3 comments
Assignees

Comments

@arqtiq
Copy link

arqtiq commented Sep 4, 2018

Hello, thanks for the work this is great !

I encountered an issue when trying to create a simple "String Value" node, based on the MathSample :

[Node("String Value", "Input", "Basic", "Allows to output a simple string value.", false)]
public void InputStringValue(string inValue, out string outValue)
{
    outValue = inValue;
}

When creating the node, I have this exception :

System.MissingMethodException: 'Constructor on type 'System.String' not found.'

This breaks into NodeVisual.cs line 193, because the tested out type is not 'String' but 'String&'.

I worked around it by replacing the test this way :

var p = output.ParameterType.Name.TrimEnd('&').ToLower() == "string"

I thought this would require your attention for a proper fix :)

@zhenyuan0502
Copy link

zhenyuan0502 commented Apr 17, 2019

@komorra I got the same problem, do you still maintain this project?

@BlizzCrafter
Copy link

Just create your own custom nodes like this:
https://gist.github.com/sqrMin1/ee7fab1a584c6c63e8c32c90f7be7dc4

You will not run into issues like this anymore.

@komorra komorra self-assigned this Jan 24, 2021
@komorra
Copy link
Owner

komorra commented Feb 6, 2021

Hi, this has been fixed now, in 01dcc29 , now it is possible to use string types directly as node input and output parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants