unity注意事项

1.you can't determine whether or not a child object is currently active in the scene by reading its activeSelf property. Instead, you should use the activeInHierarchy property, which takes the overriding effect of the parent into account.

你不能单靠读取一个对象的activeSelf属性值来判断这个对象是否处于激活状态。取而代之的是你应该使用activeInHierarchy属性,它会把父对象的状态考虑在内。

posted @ 2015-08-21 20:28  hcs2024  阅读(133)  评论(0编辑  收藏  举报