Skip to content

Instantly share code, notes, and snippets.

View Fenikkel's full-sized avatar

Pau Fenollosa Fenikkel

View GitHub Profile
@Fenikkel
Fenikkel / LocalizationEditorUtilities.cs
Last active December 6, 2023 12:57
Tools for creating Localization assets in play mode
using UnityEditor;
using UnityEditor.Localization;
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using UnityEngine;
using UnityEngine.Localization;
using UnityEngine.Localization.Settings;
@Fenikkel
Fenikkel / SpringJointDrag2D_Mouse.cs
Last active November 15, 2023 15:37
SpringJoint drag 2D
#if UNITY_STANDALONE || UNITY_EDITOR // Code specific to PC platforms (Windows, macOS, Linux)
using UnityEngine;
using System.Collections;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.UI;
using UnityEngine.Events;
public class SpringJointDrag2D_Mouse : MonoBehaviour
{
/* Fallback SpringJoint2D config */
@Fenikkel
Fenikkel / Porfolio.md
Last active June 24, 2024 02:12
Portfolio ⭐

👋 Hi there! I'm Pau Fenollosa

Portrait of Pau

 

Projects

@Fenikkel
Fenikkel / OrthographicCamFitterWindow.cs
Last active May 7, 2024 11:16
Configuration for a 2D project with SpriteRenders
using UnityEditor;
using UnityEngine;
public class OrthographicCamFitterWindow : EditorWindow
{
int _ReferenceHeight = 1080;
int _PixelsPerUnit = 100;
Camera _Camera;
string _IntroText = "<size=14><b>Notes</b></size>\n" +
@Fenikkel
Fenikkel / Singleton.cs
Last active June 12, 2024 10:13
Unity singleton
using UnityEngine;
public abstract class Singleton<T> : MonoBehaviour where T : MonoBehaviour
{
public static T Instance { get; private set; }
protected virtual void Awake()
{
CheckSingleton();
}