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 UnityEngine.UIElements; | |
| namespace ProjectHive.UI.UI | |
| { | |
| public interface IView<in TViewModel> : IView | |
| { | |
| IDisposable Bind(TViewModel viewModel); | |
| } |
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 JetBrains.Annotations; | |
| using ProjectHive.Core.Util.UniRx; | |
| using UniRx; | |
| using UnityEngine; | |
| using UnityEngine.UIElements; | |
| using UnityEngine.Video; |
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 TMPro; | |
| namespace UniRx.Extensions | |
| { | |
| public static class UnityUIExtensions | |
| { | |
| public static IDisposable SubscribeToText(this IObservable<string> source, TextMeshProUGUI text) | |
| { | |
| return source.SubscribeWithState(text, (x, t) => t.text = x); |
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.Playables; | |
| using UnityEngine.Video; | |
| public class PlayableVideoAsset : PlayableAsset | |
| { | |
| public ExposedReference<VideoClip> Clip = new ExposedReference<VideoClip>(); | |
| public float Offset; | |
| private double _duration; |
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
| /* | |
| Copyright (c) 2018 Pete Michaud, github.com/PeteMichaud | |
| 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: |
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
| #version 150 | |
| uniform float time; | |
| uniform vec2 mouse; | |
| uniform vec2 resolution; | |
| uniform vec3 spectrum; | |
| uniform sampler2D texture0; | |
| uniform sampler2D texture1; | |
| uniform sampler2D texture2; | |
| uniform sampler2D texture3; |
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
| /* Copyright (c) 2018 Manuel T. Schrempf | |
| This software is provided 'as-is', without any express or implied warranty. In | |
| no event will the authors be held liable for any damages arising from the use | |
| of this software. | |
| Permission is granted to anyone to use this software for any purpose, | |
| including commercial applications, and to alter it and redistribute it freely, | |
| subject to the following restrictions: |
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 ## | |
| *.cs diff=csharp text | |
| *.cginc text | |
| *.shader text | |
| *.mat merge=unityyamlmerge eol=lf | |
| *.anim merge=unityyamlmerge eol=lf | |
| *.unity merge=unityyamlmerge eol=lf | |
| *.prefab merge=unityyamlmerge eol=lf |
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
| 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 { |
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
| /// | |
| /// Simple pooling for Unity. | |
| /// Author: Martin "quill18" Glaude (quill18@quill18.com) | |
| /// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
| /// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
| /// UPDATES: | |
| /// 2015-04-16: Changed Pool to use a Stack generic. | |
| /// | |
| /// Usage: | |
| /// |
NewerOlder