unity 有趣的蚂蚁搬东西

一:原作地址
https://www.youtube.com/watch?v=nXKiKGZ20Wg
二:项目源码
https://github.com/mixandjam/Pikmin-Gameplay

三:运行结果
运行环境:2020.3.8f1c1
报错

'PropertyUtils' is inaccessible due to its protection leve

原因是PropertyUtils变成了私有的
解决:在报错的地方添加下面代码

 internal static class PropertyUtils
    {
        public static string ConstructConstraintDataPropertyName(string property)
        {
            return "m_Data." + property;
        }

        public static string ConstructCustomPropertyName(Component component, string property)
        {
            return component.transform.GetInstanceID() + "/" + component.GetType() + "/" + property;
        }
    }

运行结果:


有趣的游戏
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容