1、当Inspector上的值和代码中的值不一样时unity是以Inspector上的值为准的。
例:代码中的public int speed = 10; 在Inspector上修改值为20,则speed的实际值就变为20。