Skip to content

Instantly share code, notes, and snippets.

@banyudu
banyudu / figma-plugin-development-intro.blog.md
Last active November 11, 2024 06:47
Figma插件开发浅浅谈

Figma插件开发浅浅谈

Figma是一款优秀的设计工具,不仅可以便捷地实现协作开发,同时还提供了丰富的扩展能力,使得我们可以通过编写插件实现自定义的功能。

Figma官方是有提供开发者文档的,资料也比较齐全。推荐同时读一下 https://www.figma.com/plugin-docs/intro/

Visual Studio 2017
Test Professional:
VG622-NKFP4-GTWPH-XB2JJ-JFHVF
Professional:
KBJFW-NXHK6-W4WJM-CRMQB-G3CDH
4F3PR-NFKDB-8HFP7-9WXGY-K77T7
Enterprise:
NJVYC-BMHX2-G77MM-4XJMR-6Q8QF
@Marsgames
Marsgames / 01_DrawableDictionaries.MD
Last active May 10, 2024 00:02
Unity scripts to show dictionaries in the inspector

Dictionaries shown in inspector

Render


  • Put DictionaryDrawer.cs into your Assets/Editor folder

  • Put SerializableDictionary.cs into your Scripts folder

  • Create a custom dictionary

[Serializable] public class CustomDictionary : SerializableDictionary { } 
@tsubaki
tsubaki / ClickToEndBehaviour.cs
Last active May 12, 2021 10:41
UnityのTimel inで、クリックしたらクリップの末まで移動する
using UnityEngine;
using UnityEngine.Playables;
public class ClickToEndBehaviour : PlayableBehaviour
{
private PlayableDirector director { get; set; }
public override void OnPlayableCreate(Playable playable)
{
director = (playable.GetGraph().GetResolver() as PlayableDirector);
@MattRix
MattRix / EditorZoomer.cs
Created October 27, 2019 23:18
EditorZoomer - an easy way to do panning and zooming inside Unity Editor IMGUI
using UnityEngine;
using System.Collections;
using System;
//based on the code in this post: http://martinecker.com/martincodes/unity-editor-window-zooming/
//but I changed how the API works and made it much more flexible
//usage: create an EditorZoomer instance wherever you want to use it (it tracks the pan + zoom state)
//in your OnGUI, draw your scrollable content between zoomer.Begin() and zoomer.End();
//you also must offset your content by zoomer.GetContentOffset();
@elaberge
elaberge / MatrixPropertyDrawer.cs
Created January 22, 2019 03:17
Unity property drawer for 4x4 matrices
using UnityEngine;
using UnityEditor;
[CustomPropertyDrawer(typeof(Matrix4x4))]
public class MatrixPropertyDrawer : PropertyDrawer
{
const float CELL_HEIGHT = 16;
Rect position;
SerializedProperty property;
using UnityEngine;
using UnityEngine.UI;
// For a discussion of the code, see: https://www.hallgrimgames.com/blog/2018/11/25/custom-unity-ui-meshes
public class MyUiElement : MaskableGraphic
{
public float GridCellSize = 40f;
[SerializeField]
using UnityEngine.UI;
[RequireComponent(typeof(RectTransform), typeof(LayoutElement))]
[ExecuteInEditMode]
public class LayoutElementFitParent : MonoBehaviour
{
[SerializeField] private float aspectRatio = 1;
[SerializeField] private bool updateMin = false;
[SerializeField] private bool updatePreferred = false;
@dexit
dexit / LanguagePacks.txt
Last active April 13, 2025 13:22
Windows 10 language pack download list
LangPacks for Windows 10 build 10.0.14393.0 (rs1_release.160715-1616)
=======================================================================================================================================
x86
=======================================================================================================================================
ar-SA http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/07/lp_2d27aaac52b3449bddbf6081f934d5a0e04567f5.cab
bg-BG http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/07/lp_859ef8cf0175dd8e54c68ed7939d8c5654521b6e.cab
cs-CZ http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/07/lp_f3aeb974df186c213760b2fca77c12c55b4ef7f2.cab
da-DK http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/07/lp_9334cac301decb6bc155eba301db796171167629.cab
de-DE http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/07/lp_b142c3c021284f6c90eaff7fc59bdaabb6573d72.
@jringrose
jringrose / InspectorButtonAttribute.cs
Last active June 1, 2018 00:37
A utility to open up temporary inspector windows to view objects. NewInspectorWindow.cs and InspectorButtonPropertyDrawer.cs should be inside an Editor folder.
using UnityEngine;
public class InspectorButtonAttribute : PropertyAttribute { }