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
public AudioMixer mixer; | |
public void SetLinearVolumeToMixerGroup(string mixerGroupName, float linearVolume) | |
{ | |
float decibel = 20.0f * Mathf.Log10(linearVolume); | |
if (float.IsNegativeInfinity(decibel)) | |
{ | |
decibel = -96f; |
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; | |
public static class RectTransformExtension | |
{ | |
public static Vector2 GetLocalPosition(this RectTransform rectTransform, Vector2 screenPosition, Camera camera) | |
{ | |
Vector2 result = Vector2.zero; | |
RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform, screenPosition, camera, out result); |
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; | |
public static class Util | |
{ | |
public static Sprite CreateSpriteFromBytes(byte[] bytes) | |
{ | |
//横サイズの判定 | |
int pos = 16; | |
int width = 0; | |
for (int i = 0; i < 4; i++) |
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; | |
using UnityEngine.Networking; | |
using UnityEngine.UI; | |
public class UnityWebRequestTest : MonoBehaviour | |
{ | |
public Image image; | |
private void Start() |
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 UnityEditor; | |
using UnityEditor.Callbacks; | |
using System.IO; | |
using System.Linq; | |
/// <summary> | |
/// SteamWorks.Netを使ってSteamAPIを組み込むとき、テスト用のsteam_appid.txtをビルド結果のフォルダに配置する// | |
/// Unity5.2.4で動作確認// | |
/// </summary> | |
public class PostBuildProcess |
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 UnityEditor; | |
using UnityEditor.Callbacks; | |
using System.IO; | |
using System.Linq; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Debug// | |
/// Unity5.2.4で動作確認// | |
/// </summary> |
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; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
public static class AudioSourceExtention | |
{ | |
public static async Task PlayWithCompCallback(this AudioSource audioSource, AudioClip audioClip, float volume = 1f) |
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.Linq; | |
using UnityEngine; | |
using UnityEditor; | |
[InitializeOnLoad] | |
public class AutoAddImageToSplashScreen | |
{ | |
private static string IMAGEPATH = "Assets/Textures/SplashScreen/Image.png"; | |
private static string THISPATH = "Assets/Editor/AutoAddImageToSplashScreen.cs"; |
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; | |
namespace CriWareExtensions | |
{ | |
public static class CriAtomExSequencerExtension | |
{ | |
public delegate void EventCbFunc(CriSequenceParam param); | |
public static void SetEventCallback(EventCbFunc callback) | |
{ |
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.Threading; | |
using System.Threading.Tasks; | |
public static class ADX2AddCueSheetToTask | |
{ | |
public static Task<CriAtomCueSheet> ToTask(this CriAtomCueSheet cueSheet, CancellationToken ct) | |
{ | |
var tcs = new TaskCompletionSource<CriAtomCueSheet>(); | |
if (ct != CancellationToken.None) |