This file contains 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
// Copyright 2020 nariakiiwatani | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
This file contains 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; | |
using UnityEngine.Networking; | |
public class LoadAssetBundlesFromUnityWebRequestAsync : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
StartCoroutine(LoadAssetBundleAsync()); | |
} |
This file contains 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.Runtime.CompilerServices; | |
using UnityEngine; | |
using Unity.Collections; | |
using static Unity.Mathematics.math; | |
public struct NativeCurve : IDisposable | |
{ | |
public bool IsCreated => values.IsCreated; |
This file contains 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 "Starfield" | |
{ | |
Properties | |
{ | |
_iMouse ("iMouse", Vector) = (0,0,0,0) | |
_Iterations ("Iterations", int) = 17 | |
_Formuparam ("Formuparam", float) = .53 | |
_Steps ("Steps", int) = 20 | |
_StepSize ("StepSize", float) = .1 | |
_Zoom ("Zoom", float) = .8 |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
[ExecuteInEditMode, DisallowMultipleComponent] | |
public class PrefabLightmapData : MonoBehaviour | |
{ | |
[System.Serializable] | |
struct RendererInfo | |
{ |
This file contains 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 UnityEngine; | |
using UnityEngine.Playables; | |
using UnityEngine.Timeline; | |
public class AlphaBehaviour : PlayableBehaviour | |
{ | |
public float Alpha; | |
} |
This file contains 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
For Unity 2019 plase use this | |
==> https://github.com/rutcreate/TextMesh-Pro-Thai | |
==> 90% of font need to edit for some character | |
==> or add | |
==> "com.unity.textmeshpro": "https://github.com/rutcreate/TextMesh-Pro-Thai.git" | |
==> To manifest.json in your project | |
==> Unity5 or lower | |
Manual Patch |
This file contains 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_MATRIX_IT_MV[0].xyz = ??? | |
UNITY_MATRIX_IT_MV[1].xyz = Camera Up | |
UNITY_MATRIX_IT_MV[2].xyz = Camera Forward | |
float3 forward = -normalize(UNITY_MATRIX_V._m20_m21_m22); | |
float3 up = normalize(UNITY_MATRIX_V._m10_m11_m12); | |
float3 right = normalize(UNITY_MATRIX_V._m00_m01_m02); | |
float3 cameraUp = unity_CameraInvProjection[1].xyz; | |
float3 camRight = cross(unity_CameraInvProjection[2].xyz, cameraUp); |
This file contains 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; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class CircleText : BaseVertexEffect | |
{ | |
public int radius = 50; | |
public float spaceCoff = 1f; |
This file contains 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
private static string[] _persistentDataPaths; | |
public static bool IsDirectoryWritable(string path) { | |
try { | |
if (!Directory.Exists(path)) return false; | |
string file = Path.Combine(path, Path.GetRandomFileName()); | |
using (FileStream fs = File.Create(file, 1)) {} | |
File.Delete(file); | |
return true; | |
} catch { |
NewerOlder