When determining which objects to accept, the place point will first check if the object being placed matches the "Match Target"
If the match target is empty, it will compare the names in the PlaceNames list to see if the object being placed's name contains any of the list parameters.
Place Points are also manageable though code with these functions
//Will accept a grabbable, if "CanPlace()" flag is cleared and nothing is currently place
placePoint.Place(Grabbable grabbable)
//Removes what is in it, if it matches the current placeObject
placePoint.Remove(Grabbable grabbable)
//Getter for the current place object in the place point -> returns null if none
placePoint.placedObject
//Getter for the current highlight object in the place point -> returns null if none
placePoint.highlightingObj
Connect Place Point events through a custom script
using UnityEngine;
using Autohand;
public class PlacePointEventTemplate : MonoBehaviour {
public PlacePoint placePoint;
void OnEnable() {
placePoint.OnPlaceEvent += OnPlace;
placePoint.OnRemoveEvent += OnPlace;
placePoint.OnHighlightEvent += OnHighlight;
placePoint.OnStopHighlightEvent += OnStopHighlight;
}
private void OnDisable() {
placePoint.OnPlaceEvent -= OnPlace;
placePoint.OnRemoveEvent -= OnPlace;
placePoint.OnHighlightEvent -= OnHighlight;
placePoint.OnStopHighlightEvent -= OnStopHighlight;
}
public void OnPlace(PlacePoint point, Grabbable grab) {
//Stuff happens when placed
}
public void OnRemove(PlacePoint point, Grabbable grab) {
//Stuff happens when placed was removed
}
public void OnHighlight(PlacePoint point, Grabbable grab) {
//Stuff happens when placepoint was highlighted
}
public void OnStopHighlight(PlacePoint point, Grabbable grab) {
//Stuff happens when placepoint was done highlighting
}
}