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
#!/bin/bash | |
# put this next to your game's *.app file and run | |
APP_PATH="$(dirname "$0")"/*.app | |
echo "Making all .app bundles in this folder executable..." | |
chmod -R +x $APP_PATH | |
echo "Removing quarantine attribute..." |
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
using System; | |
using System.IO; | |
using UnityEngine; | |
public class LogToFile : MonoBehaviour | |
{ | |
#if !UNITY_EDITOR && !UNITY_WEBGL | |
private string logFilePath; | |
private StreamWriter logWriter; | |
private int logCounter = 0; |
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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections.Generic; | |
using UnityEditor.IMGUI.Controls; | |
public class CMSEntityExplorer : EditorWindow | |
{ | |
private const string SEARCH_PATH = "Assets/ldgame/data/Resources"; | |
private string searchQuery = ""; |
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
using System; | |
using UnityEditor; | |
using UnityEditor.Compilation; | |
[InitializeOnLoad] | |
public static class CompileTimeLogger | |
{ | |
private const string CompileStartTimeKey = "CompileStartTime"; | |
private const string PlayModeTimerKey = "PlayModeStartTime"; |
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
using UnityEngine; | |
public class VerletRope : MonoBehaviour | |
{ | |
public Transform startPoint; // Начальная точка верёвки | |
public Transform endPoint; // Конечная точка верёвки | |
public int segmentCount = 10; // Количество сегментов верёвки | |
public float segmentLength = 0.2f; // Длина каждого сегмента | |
public int simulationIterations = 5; // Количество итераций симуляции | |
public float gravity = -9.8f; // Гравитация |
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
// say you have Resources/test1.prefab | |
// /folder | |
// sound.wav | |
// this will generate | |
// class GameResources | |
// GameObject test1 | |
// class Folder | |
// AudioClip sound | |
// and you'll be able to do | |
// GameResources.Folder.sound in your code! |
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
// this handles strings like | |
// Ignores %TagDiceModifierIgnoresArmor::value% armor | |
// and stuff, useful for complex descriptions | |
[Serializable] | |
public class TagDescription : EntityComponentDefinition | |
{ | |
public string loc; | |
public string ParseTagDescription(CMSEntity entity) |
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
# builds unity webgl build and uploads it to itch | |
# you'll need an itch.io butler for this | |
# https://itch.io/docs/butler/login.html | |
import os | |
import subprocess | |
import time | |
from git import Repo | |
# Configuration |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class RaycastInverter : Mask | |
{ | |
public override bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera) | |
{ | |
return !base.IsRaycastLocationValid(sp, eventCamera); |
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
// Just create a bunch LocString's anywhere | |
// change Loc.language and you're done | |
using System.Collections.Generic; | |
using System; | |
using System.Collections.Generic; |
NewerOlder