This file contains 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
using UnityEditor; | |
using UnityEngine; | |
namespace CleverCrow.ColdIronCity.QuickCursor { | |
[InitializeOnLoad] | |
public class GlobalCursor { | |
const float normalizationFactor = 1.2f; | |
static Vector3 cursorPosition = Vector3.zero; | |
static Quaternion cursorRotation = Quaternion.identity; | |
static readonly Color lineColor = Color.black; |
This file contains 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
import bpy | |
def parent_object_to_bone_by_name(armature, obj): | |
# Remove the 'O' prefix from the object's name to find the corresponding bone | |
bone_name = obj.name[1:] if obj.name.startswith("O") else None | |
if bone_name and bone_name in armature.pose.bones: | |
target_bone = armature.pose.bones[bone_name] | |
# Store the original world matrix of the object |
This file contains 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
using Adnc.Utility; | |
using UnityEngine; | |
using UnityEngine.Events; | |
namespace CleverCrow.DungeonsAndHumans.Explorations { | |
public class TriggerEvents : MonoBehaviour { | |
private TriggerEventsInternal _internal; | |
[SerializeField] | |
private string _tag; |
This file contains 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
class Door : MonoBehavior { | |
private Fsm _fsmDoor; | |
private enum State { | |
Opened, | |
Closed, | |
Locked, | |
Unlocked, | |
ToggleLock, | |
} |
This file contains 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
version: '3' | |
services: | |
mongodb: | |
image: mongo:3.6.1 | |
container_name: uv-mongodb | |
volumes: | |
- mongodb:/data/db | |
- mongodb_config:/data/configdb | |
ports: | |
- 27017:27017 |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace Adnc.QuickParallax { | |
[CreateAssetMenu(fileName = "ParallaxSettings", menuName = "ADNC/Parallax/Settings", order = 1)] | |
public class ParallaxSettings : ScriptableObject { | |
private static ParallaxSettings _current; | |
private const string RESOURCE_PATH = "ParallaxSettings"; |
This file contains 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
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
namespace Adnc.Utility.Editors { | |
public abstract class SortableListBase { | |
protected ReorderableList _list; | |
protected Editor _editor; | |
protected SerializedObject _serializedObject; |
This file contains 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
using UnityEditor; | |
using UnityEngine; | |
namespace Adnc.EditorHelpers { | |
public static class EditorPrefsObjectHelper { | |
/// <summary> | |
/// Save the object to the editor prefs. Only persists for the current editor session | |
/// </summary> | |
/// <param name="key"></param> | |
/// <param name="obj"></param> |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
namespace Adnc.Pathfinding2D.Utility { | |
/// <summary> | |
/// Usage example: | |
/// [CustomEditor(typeof(MyBaseClass))] |
This file contains 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
function onOpen() { | |
var menu = [{name: 'Count Words', functionName: 'countWords'}]; | |
SpreadsheetApp.getActive().addMenu('Count', menu); | |
} | |
function countWords() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getActiveRange().getValues(); | |
var s = ""; |
NewerOlder