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 UnityEditor; | |
using UnityEditor.Toolbars; | |
using UnityEngine; | |
public static class Example | |
{ | |
[MainToolbarElement( "ピカチュウ", defaultDockPosition = MainToolbarDockPosition.Middle )] | |
public static MainToolbarElement Create() | |
{ | |
var image = ( Texture2D )EditorGUIUtility.IconContent( "SettingsIcon" ).image; |
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 JetBrains.Annotations; | |
using UnityEngine; | |
namespace Kogane | |
{ | |
public static class UIOverlapChecker | |
{ | |
private static readonly Vector3[] CORNERS = new Vector3[ 4 ]; | |
public static bool IsOverlapping |
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.Diagnostics; | |
using UnityEngine; | |
using UnityEngine.UI; | |
internal sealed class Example : MonoBehaviour | |
{ | |
public Text m_versionText; | |
public Text m_text; |
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/ExcludeBlackSpriteShader" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
_Threshold ("Threshold", Range(0.0, 1.0)) = 0.1 | |
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 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
[SerializeField] TextMeshPro tmpStandard; | |
[SerializeField] TextMeshProUGUI tmpUI; | |
public void SendTmpToRenderTexture() | |
{ | |
Vector2 size = new Vector2(100f, 100f); | |
RenderTexture tex = RenderTexture.GetTemporary(100f, Mathf.RoundToInt(size.y * 200f), 24, RenderTextureFormat.ARGB32); | |
GL.PushMatrix(); // copy current camera matrix settings | |
GL.LoadIdentity(); |
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
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
// Unlit alpha-blended shader. | |
// - no lighting | |
// - no lightmap support | |
// - no per-material color | |
Shader "Unlit/Transparent SpriteMask" { | |
Properties { | |
_MainTex ("Base (RGB) Trans (A)", 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.Collections; | |
using UnityEngine; | |
public class Example : MonoBehaviour | |
{ | |
private IEnumerator Start() | |
{ | |
Screen.SetResolution( 640, 480, true ); | |
yield return null; |
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 Kogane; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
public class Example : MonoBehaviour | |
{ | |
private IEnumerator Start() | |
{ | |
const string url = |
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
// ReSharper disable UnusedMember.Global | |
namespace MyProject | |
{ | |
/// <summary> | |
/// 購入エラーコード | |
/// https://sdk.revenuecat.com/android/4.6.1/public/com.revenuecat.purchases/-purchases-error-code/index.html | |
/// </summary> | |
public enum PurchasesErrorCode | |
{ |
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.Generic; | |
using Cysharp.Threading.Tasks; | |
namespace Kogane | |
{ | |
/// <summary> | |
/// Purchases 型の拡張メソッド | |
/// </summary> | |
public static class PurchasesExtensionMethods | |
{ |
NewerOlder