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
public class AstcImporterMapper : AssetPostprocessor | |
{ | |
private void OnPreprocessTexture() | |
{ | |
// TODO: this should be using the TextureImporterConfiguration | |
if (assetPath.Contains("_XXXY") || assetPath.Contains("_SME") || assetPath.Contains("_A")) | |
AssetDatabaseExperimental.SetImporterOverride<AstcTextureImporter>(assetPath); | |
else if (AssetDatabaseExperimental.GetImporterOverride(assetPath) != null) | |
AssetDatabaseExperimental.ClearImporterOverride(assetPath); | |
} |
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
float4x4 WorldViewProj : WorldViewProjection; | |
texture ColorTexture; | |
sampler2D ColorSampler = sampler_state { | |
Texture = <ColorTexture>; | |
FILTER = MIN_MAG_MIP_LINEAR; | |
AddressU = Wrap; | |
AddressV = Wrap; | |
}; |
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
static void SetupDpiAwareness() | |
{ | |
bool success = false; | |
List<string> errorCauses = new List<string>(); | |
string successfulMethod = null; | |
try | |
{ | |
var result = DpiAwareness.SetProcessDpiAwareness(DpiAwareness.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE); | |
if (result == DpiAwareness.HRESULT.E_ACCESSDENIED) | |
{ |
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
<entry> | |
<record>566</record> | |
<time>2017/03/08 16:55:29.708</time> | |
<type>Error</type> | |
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source> | |
<description>A MEF Component threw an exception at runtime: System.IO.FileLoadException: Could not load file or assembly 'SyntaxTree.VisualStudio.Unity, Version=2.8.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'SyntaxTree.VisualStudio.Unity, Version=2.8.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
 at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)� |
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
class Foo : MonoBehaviour | |
{ | |
Coroutine m_coroutine; | |
readonly HashSet<IEnumerator> m_innerCoroutines = new HashSet<IEnumerator>(); | |
public void StartThing() | |
{ | |
m_coroutine = StartCoroutine(ParentCoroutine()); | |
} | |
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
class Foo : MonoBehaviour | |
{ | |
Coroutine m_coroutine; | |
public void StartThing() | |
{ | |
m_coroutine = StartCoroutine(ParentCoroutine()); | |
} | |
public void EndThing() |
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.Globalization; | |
using UnityEngine; | |
namespace Yarn | |
{ | |
// A value from inside Yarn. | |
public struct Value : IComparable, IComparable<Value>, IEquatable<Value> | |
{ | |
internal readonly Type type; |
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.Collections.Concurrent; | |
namespace FezEngine.Tools | |
{ | |
public static class DrawActionScheduler | |
{ | |
static readonly ConcurrentQueue<Action> DeferredDrawActions = new ConcurrentQueue<Action>(); | |
public static void Schedule(Action action) |
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
public static class EventExtensions | |
{ | |
public static void AddEvent<TSource, TEvent>(this EventTrigger _trigger, EventTriggerType _eventType, TSource _source, Action<TSource, TEvent> _delegate) | |
where TEvent : BaseEventData | |
{ | |
EventTrigger.TriggerEvent triggerEvent = new EventTrigger.TriggerEvent(); | |
triggerEvent.AddListener(_data => _delegate(_source, _data as TEvent)); | |
_trigger.triggers.Add(new EventTrigger.Entry { eventID = _eventType, callback = triggerEvent }); | |
} | |
} |
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 Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.GamerServices; | |
using XnaCommons.Structure; | |
using XnaCommons.Tools; | |
namespace XnaCommons.Components | |
{ | |
public static class Waiters | |
{ |
NewerOlder