Created
January 17, 2024 12:49
-
-
Save zonaryFUND/5fab93ad3c8cb96da8598be6c0b47afd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ドラッグして移動されるオブジェクトAを受け取るオブジェクトBにアタッチされるべきコンポーネント | |
public class ReceiverComponentB: MonoBehaviour, IDropReceiver { | |
public void OnOverlappingCorrespondingSenderChange(GameObject senderObject) { | |
// このオブジェクトがDraggedComponentAを持つ別のオブジェクトと重なった/重ならなくなったときに呼ばれる | |
// 色替えなどをする | |
} | |
public void OnDrop(GameObject senderObject) { | |
// このオブジェクトがDraggedComponentAを持つ別のオブジェクトと重なったままドロップされたときに呼ばれる | |
// 各種処理をする | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment