美文网首页unity3D技术分享Unity教程合集
unity将object[]或者string对象转换成枚举enu

unity将object[]或者string对象转换成枚举enu

作者: 好怕怕 | 来源:发表于2017-04-14 10:36 被阅读277次

unity将object[]或者string对象转换成枚举enum

    protected override void OnSetData(params object[] datas)
    {
        string str = datas[0].ToString();
        LoopType type = (LoopType )Enum.Parse(typeof(LoopType ), str);
    }

相关文章

网友评论

    本文标题:unity将object[]或者string对象转换成枚举enu

    本文链接:https://www.haomeiwen.com/subject/pqruattx.html