Class SnappingModule
Inheritance
SnappingModule
Syntax
[MainMenuItem("Snapping", "Settings", "Select snapping modes", null)]
public sealed class SnappingModule : ScriptableSettings<SnappingModule>, IDelayedInitializationModule, IModuleBehaviorCallbacks, IModule, IUsesViewerScale, IFunctionalitySubscriber<IProvidesViewerScale>, ISettingsMenuProvider, ISerializePreferences, IStandardIgnoreList, IUsesSceneRaycast, IFunctionalitySubscriber<IProvidesSceneRaycast>, IFunctionalitySubscriber, IProvidesSnapping, IFunctionalityProvider
Properties
groundSnappingEnabled
Declaration
public bool groundSnappingEnabled { get; set; }
Property Value
ignoreList
Declaration
public List<GameObject> ignoreList { set; }
Property Value
Type |
Description |
List<GameObject> |
|
Implements
initializationOrder
Declaration
public int initializationOrder { get; }
Property Value
Implements
rayOrigin
Declaration
public Transform rayOrigin { get; }
Property Value
Type |
Description |
Transform |
|
Implements
Declaration
public GameObject settingsMenuInstance { set; }
Property Value
Type |
Description |
GameObject |
|
Implements
Declaration
public GameObject settingsMenuPrefab { get; }
Property Value
Type |
Description |
GameObject |
|
Implements
shutdownOrder
Declaration
public int shutdownOrder { get; }
Property Value
Implements
Methods
Declaration
public void ClearSnappingState(Transform rayOrigin)
Parameters
Type |
Name |
Description |
Transform |
rayOrigin |
|
Implements
ConnectSubscriber(Object)
Declaration
public void ConnectSubscriber(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Implements
Declaration
public bool DirectSnap(Transform rayOrigin, Transform transform, ref Vector3 position, ref Quaternion rotation, Vector3 targetPosition, Quaternion targetRotation)
Parameters
Type |
Name |
Description |
Transform |
rayOrigin |
|
Transform |
transform |
|
Vector3 |
position |
|
Quaternion |
rotation |
|
Vector3 |
targetPosition |
|
Quaternion |
targetRotation |
|
Returns
Implements
Initialize()
Declaration
Implements
LoadModule()
Declaration
Implements
LoadProvider()
Declaration
public void LoadProvider()
Implements
Declaration
public bool ManipulatorSnap(Transform rayOrigin, Transform[] transforms, ref Vector3 position, ref Quaternion rotation, Vector3 delta, AxisFlags constraints, PivotMode pivotMode)
Parameters
Type |
Name |
Description |
Transform |
rayOrigin |
|
Transform[] |
transforms |
|
Vector3 |
position |
|
Quaternion |
rotation |
|
Vector3 |
delta |
|
AxisFlags |
constraints |
|
PivotMode |
pivotMode |
|
Returns
Implements
OnBehaviorAwake()
Declaration
public void OnBehaviorAwake()
Implements
OnBehaviorDestroy()
Declaration
public void OnBehaviorDestroy()
Implements
OnBehaviorDisable()
Declaration
public void OnBehaviorDisable()
Implements
OnBehaviorEnable()
Declaration
public void OnBehaviorEnable()
Implements
OnBehaviorStart()
Declaration
public void OnBehaviorStart()
Implements
OnBehaviorUpdate()
Declaration
public void OnBehaviorUpdate()
Implements
OnDeserializePreferences(Object)
Declaration
public void OnDeserializePreferences(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
OnSerializePreferences()
Declaration
public object OnSerializePreferences()
Returns
Shutdown()
Declaration
Implements
UnloadModule()
Declaration
public void UnloadModule()
Implements
UnloadProvider()
Declaration
public void UnloadProvider()
Implements
Explicit Interface Implementations
IFunctionalitySubscriber<IProvidesSceneRaycast>.provider
Declaration
IProvidesSceneRaycast IFunctionalitySubscriber<IProvidesSceneRaycast>.provider { get; set; }
Returns
Implements
IFunctionalitySubscriber<IProvidesViewerScale>.provider
Declaration
IProvidesViewerScale IFunctionalitySubscriber<IProvidesViewerScale>.provider { get; set; }
Returns
Implements
Extension Methods
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.