Make coroutine functions be forced to be created with the coroutine keyword.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
@@ -77,7 +78,8 @@ namespace Upsilon.BaseTypes.UserData
|
||||
}
|
||||
if (Methods.TryGetValue(member, out var method))
|
||||
{
|
||||
return (new ScriptMethodInfoFunction(method, value, false), false, null);
|
||||
var isCoroutine = typeof(IEnumerator).IsAssignableFrom(method.ReturnType);
|
||||
return (new ScriptMethodInfoFunction(method, value, false, isCoroutine), false, null);
|
||||
}
|
||||
|
||||
return (null, true, $"Can't find public member '{member}' on type '{Type}'.");
|
||||
|
||||
Reference in New Issue
Block a user