Skip to content

Instantly share code, notes, and snippets.

View mattiemonster's full-sized avatar
🏠
Working from home

Mattie mattiemonster

🏠
Working from home
  • England
View GitHub Profile
@mattiemonster
mattiemonster / CreateLanguageFiles.cs
Last active August 30, 2018 17:22
Unity Editor extension to easily create all supported language files
´╗┐using UnityEditor;
using UnityEngine;
using System.IO;
namespace Vortex
{
public class CreateLanguageFiles : MonoBehaviour
{
[MenuItem("VortexDev/Text Loader/Create Language Files")]
´╗┐using System;
using System.Collections.Generic;
using UnityEngine;
using System.Text.RegularExpressions;
namespace Vortex.TextLoader
{
[Serializable]
public enum Language
{
´╗┐using UnityEngine;
using TMPro;
using System.Collections.Generic;
namespace Vortex.TextLoader
{
[RequireComponent(typeof(TextMeshProUGUI))]
public class TranslatableText : MonoBehaviour
{
TextMeshProUGUI text;
@mattiemonster
mattiemonster / Window Code 050518 1310.cs
Last active May 5, 2018 12:11
Some code for my wpf test app, uploaded for the sake of testing VS Gist creation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
@mattiemonster
mattiemonster / Echo.py
Last active May 13, 2017 14:52
A python file that echos a message and logs it.
import time
current_time = time.localtime()
newline = "\n"
title = "log_" + time.strftime("%d-%m-%Y %H-%M-%S", current_time) + ".txt"
file = open(title, "w+")
current_time = time.localtime()
file.writelines(time.strftime('%d-%m-%Y %H:%M:%S', current_time))
file.writelines(" - Initialised.")
file.writelines(newline)