InputPin Evaluate

Tue 21. Mar 2017, 10:22

Hi,

I think there is a typo in the InputPin class, the second parameters of evaluate method is not Optionnal but it was in IConditionEvaluator and I think methodProvider could be optionnal too

Code: Select all
     
public class InputPin : ArticyPrimitive, IInputPin
{
    public bool Evaluate(Articy.Unity.IBaseScriptMethodProvider aMethodProvider, Articy.Unity.Interfaces.IGlobalVariables aGlobalVariables)
        {
            return Text.CallScript(aMethodProvider, aGlobalVariables);
        }
}


Code: Select all
public interface IConditionEvaluator
    {
        bool Evaluate(IBaseScriptMethodProvider aMethodProvider, IGlobalVariables aGlobalVariables = null);
    }


Code: Select all
public class ArticyScriptCondition : IArticyScriptFragment, IObjectCloning
{
   public bool CallScript(IBaseScriptMethodProvider aMethodProvider = null, IGlobalVariables aVariables = null);
}
User avatar
Zeldarck
 
Posts: 55
Joined: Thu 9. Mar 2017, 16:03

Re: InputPin Evaluate

Tue 21. Mar 2017, 10:28

Yes, good point!

The reason was that optional arguments are a bit "hacky" in CodeDOM(thats what i use to generate the source files) as they are not officially supported(in the readable variant "int a = 0") and i tried to avoid to many of those workaround solutions when dealing with CodeDOM.

Anyway, i think here should convenience for the user win.

Thanks for pointing that out

Best regards

Nico

Edit: as it seems, i used the "correct" solution on Conditions.
Nico Probst
Senior Software Engineer | Articy | LinkedIn
User avatar
[Articy] Nico Probst
Articy Staff
Articy Staff
 
Posts: 217
Joined: Wed 23. Nov 2011, 09:45
Location: Bochum

Return to articy:draft Unity Importer

Who is online

Users browsing this forum: No registered users and 9 guests

Who We Are
Contact Us
Social Links