2017-05-01から1ヶ月間の記事一覧

AOJ 0139 Snakes

問題 http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0139 文字列が蛇かを判定する問題 A種の例: >'====#====~ >'==#==~ B種の例: >^Q=Q=Q=Q=~~ >^Q=Q=~~ 提出 指定のパターンの蛇かを判定する問題 私はいくつもif分で弾く判定を足していき、…

error CS1502: The best overloaded method match for `UnityEngine.Events.UnityEvent.AddListener(UnityEngine.Events.UnityAction)' has some invalid arguments

If you want to use AddListener and void function, you should not write like ``` button.onClick.AddListener (someFunction(id)); ``` but ``` button.onClick.AddListener (() => someFunction(id)); ```

RemoveAllListeners can't remove listeners

Refer to doc. https://docs.unity3d.com/jp/current/ScriptReference/Events.UnityEventBase.RemoveAllListeners.html It says that RemoveAllListeners can only remove listeners attached at runtime.