I’m new to Enums and I’m trying to figure out how I can pass enum values form Max script to a C# fucntion.
For some reason the argument is not being recognized…
here’s my C#
namespace myTools
{
public class Files
{
public enum AssetType {heroes,grunts,weapons,items}
public string newAsset(AssetType type, string assetName)
{
string message = string.Format("NewAsset:{0} {1}", type.ToString(), assetName);
return message;
}
}
}
and the mxs with --listener output
Files =dotNetObject "myTools.Files"
--dotNetObject:myTools.Files
type=dotnetClass "myTools.Files+AssetType"
--dotNetClass:myTools.Files+AssetType
Files.NewAsset (type.heroes) "newHero"
-- Runtime error: No method found which matched argument list