一:原作地址
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;
}
}
运行结果: