public override void Init() { base.Init(); if (!mEntityTemplateDragSurfaceSnap) { mEntityTemplateDragSurfaceSnap = entityTemplate.GetComponent <DragSurfaceSnap>(); } }
void Awake() { if (!drag) { drag = GetComponent <DragSurfaceSnap>(); } if (!entity) { entity = GetComponent <M8.EntityBase>(); } drag.dragEndCallback += OnDragEnd; }