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
Shader "Custom/DiffusePlusLightmap" | |
{ | |
Properties | |
{ | |
_MainTex ("Main Texture", 2D) = "white" {} | |
_LightmapTex ("Lightmap", 2D) = "white" {} | |
_LightIntensity ("Light Intensity", Range(0, 10)) = 1 | |
_Emission ("Emission", Color) = (0, 0, 0, 1) | |
} |
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
Shader "Custom/PlanarShadow" | |
{ | |
Properties { | |
_ShadowColor ("Shadow Color", Color) = (0,0,0,1) | |
_PlaneHeight ("planeHeight", Float) = 0 | |
} | |
SubShader { | |
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} |
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.IO; | |
using UnityEngine; | |
using UnityEditor; | |
public static class ClipNinePatch | |
{ | |
[MenuItem("Assets/Clip Nine Patch", true)] | |
static bool ValidateClipNinePatchImage() | |
{ | |
Texture2D texture = Selection.activeObject as Texture2D; |
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 UnityEngine.UI; | |
namespace UGuiExtension | |
{ | |
public class CenterTiledImage : Image | |
{ | |
protected override void OnPopulateMesh(VertexHelper toFill) | |
{ | |
if (type != Type.Tiled || |
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
Shader "Custom/Sprite" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 | |
[HideInInspector] _RendererColor ("RendererColor", Color) = (1,1,1,1) | |
[HideInInspector] _Flip ("Flip", Vector) = (1,1,1,1) | |
[PerRendererData] _AlphaTex ("External Alpha", 2D) = "white" {} |
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; | |
#if UNITY_ANDROID | |
using Unity.Notifications.Android; | |
#elif UNITY_IOS | |
using UnityEngine.iOS; | |
using CalendarUnit = UnityEngine.iOS.CalendarUnit; | |
using LocalNotification = UnityEngine.iOS.LocalNotification; | |
using NotificationServices = UnityEngine.iOS.NotificationServices; | |
#endif | |
using UnityEngine; |
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 System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
namespace .Editor | |
{ | |
public static class CustomFontHelper | |
{ |
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.Collections.Generic; | |
namespace Game.Util | |
{ | |
public class FluentFsm<TState, TEvent> | |
where TState : Enum | |
where TEvent : Enum | |
{ | |
readonly Dictionary<TState, State> _states = new Dictionary<TState, State>(); |
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 HopTiles.GamePlay; | |
using UnityEditor; | |
using UnityEngine; | |
namespace HopTiles.Editor | |
{ | |
[CustomEditor(typeof(SlicedCube))] | |
public class SlicedCubeInspector : UnityEditor.Editor | |
{ | |
SerializedProperty _borderSize; |
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
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
using UnityEngine; | |
namespace HopTiles.GamePlay | |
{ | |
// todo 待删除 | |
public class SlicedCube : MonoBehaviour | |
{ |
NewerOlder