public void GameObjectWithIgnoreAttribIsNotSnapped() { var go = new GameObject(); Assert.IsTrue(EditorUtility.SnapIsEnabled(go.transform)); EditorUtility.ClearSnapEnabledCache(); go.AddComponent <IgnoreSnap>(); Assert.IsFalse(EditorUtility.SnapIsEnabled(go.transform)); UObject.DestroyImmediate(go); }
public void GameObjectWithIgnoreInterfaceIsSnapped() { var go = new GameObject(); Assert.IsTrue(EditorUtility.SnapIsEnabled(go.transform)); var attrib = go.AddComponent <IgnoreSnapInterface>(); EditorUtility.ClearSnapEnabledCache(); attrib.snapEnabled = true; Assert.IsTrue(EditorUtility.SnapIsEnabled(go.transform)); UObject.DestroyImmediate(go); }
public void GameObjectWithConditionalIgnoreAttribIsSnapped() { var go = new GameObject(); Assert.IsTrue(EditorUtility.SnapIsEnabled(go.transform)); var attrib = go.AddComponent <IgnoreSnapConditionalAttribute>(); EditorUtility.ClearSnapEnabledCache(); attrib.m_SnapEnabled = true; Assert.IsTrue(EditorUtility.SnapIsEnabled(go.transform)); UObject.DestroyImmediate(go); }