{"title":"\u30a8\u30c7\u30a3\u30bf\u3092\u5b9f\u884c\u3057\u3066\u3044\u306a\u3044\u6642\u306bOnValidate\u3067Destory\u3010Unity\u3011\u3010\u30a8\u30c7\u30a3\u30bf\u62e1\u5f35\u3011","type":"rich","description":"\u30a8\u30c7\u30a3\u30bf\u62e1\u5f35\u3068\u306f \u3053\u306e\u8a18\u4e8b\u3067\u306e\u30d0\u30fc\u30b8\u30e7\u30f3 Unity 5.3.4f1 Personal \u306f\u3058\u3081\u306b \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30a8\u30c7\u30a3\u30bf\u3092\u5b9f\u884c\u3057\u3066\u3044\u306a\u3044\u6642\u306bOnValidate\u3067Destory\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002 private void OnValidate (){ Destroy (gameObject); } Destroy may not be called from edit mode! Use DestroyImmediate instead. Also think twice if you really want to destroy something in edit mode. S\u2026","height":"190","provider_url":"https://hatena.blog","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/k/kan_kikuchi/20160623/20160623132947.png","version":"1.0","width":"100%","url":"https://kan-kikuchi.hatenablog.com/entry/OnValidate_Destory","provider_name":"Hatena Blog","author_name":"kan_kikuchi","blog_url":"https://kan-kikuchi.hatenablog.com/","published":"2016-07-14 08:12:07","categories":["Unity","\u30a8\u30c7\u30a3\u30bf\u62e1\u5f35"],"author_url":"https://blog.hatena.ne.jp/kan_kikuchi/","blog_title":"(:3[kan\u306e\u30e1\u30e2\u5e33]","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkan-kikuchi.hatenablog.com%2Fentry%2FOnValidate_Destory\" title=\"\u30a8\u30c7\u30a3\u30bf\u3092\u5b9f\u884c\u3057\u3066\u3044\u306a\u3044\u6642\u306bOnValidate\u3067Destory\u3010Unity\u3011\u3010\u30a8\u30c7\u30a3\u30bf\u62e1\u5f35\u3011 - (:3[kan\u306e\u30e1\u30e2\u5e33]\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}