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
// Thing.cs | |
// Automatically indexed MonoBehaviour for searching by type. | |
// | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace Things | |
{ |
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
// assembly == the gameobject root to move | |
// feature == the specific place on the assembly to align with station | |
// station == the reference to which the assembly feature will align | |
// flip == an additional rotation applied to the assembly pivoting | |
// around the feature (e.g., 180º Y flip) | |
// | |
public static void AlignAtFeature( | |
Transform assembly, Transform feature, Transform station, | |
Quaternion flip) | |
{ |
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
// QuitAppOnEscape.cs | |
// | |
using UnityEngine; | |
#if ENABLE_INPUT_SYSTEM | |
using UnityEngine.InputSystem; | |
#endif | |
namespace Screenplay.Workbench | |
{ | |
// |
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
// ReplaceMaterial.cs | |
// | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace Screenplay | |
{ | |
// | |
// When enabled, all materials (or all materials matching given original) | |
// in this object are replaced with another material. When disabled, the |
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
# | |
# Object > Set Mesh Origin to Bottom | |
# A python script compatible with Blender 2.90 API. | |
# | |
# Takes the currently selected mesh-type objects, | |
# and moves the object origin location to the "bottom" of the mesh. | |
# The bottom is calculated as the average X and Y and the minimum Z. | |
# | |
# This is useful in 3D Printing, for example, when importing published | |
# STL geometry files. Typically the bottom of the shape is flat and |
NewerOlder