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
namespace UnityEditor.AddressableAssets.Settings | |
{ | |
/// <summary> | |
/// Adapter to provide a public API into <seealso cref="ProjectConfigData"/> internals. | |
/// </summary> | |
public static class ProjectConfigDataAdapter | |
{ | |
public static bool generateBuildLayout | |
{ | |
get => ProjectConfigData.generateBuildLayout; |
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; | |
class CustomComponent : MonoBehaviour | |
{ | |
// Configure custom world-space bounds as you like in the editor | |
public Bounds CustomFocusBounds; | |
} |
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
namespace Game.Camera | |
{ | |
using UnityEngine; | |
/// <summary> | |
/// Applies a custom LOD bias factor to rendering when attached to a camera | |
/// </summary> | |
[RequireComponent(typeof(Camera))] | |
class CustomLodBias : MonoBehaviour | |
{ |
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
// Hack to avoid creating lots of garbage by creating long[] arr = new long[2]; | |
// There may be ways to implement this in a better way | |
// But all of them coming to my mind involve unsafe code | |
// Quickly breaks down when trying to emulate larger arrays | |
// -> then using switch() to select the right values | |
// -> Some compilers will optimize the switch() as a binary search, but still - Unsafe implementation can be O(1)! | |
struct ulong2 | |
{ | |
ulong l0; | |
ulong l1; |
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
namespace ZS.Tools | |
{ | |
using System; | |
using System.Globalization; | |
using System.Text; | |
/// <summary> | |
/// The safe double class is mainly a interface between doubles and | |
/// their string representation. Traditional string representations of | |
/// doubles suffer from lossy precision. i.e. converting doubles to strings |
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
#!/bin/sh | |
# SVN post-commit hook that triggers a team city build with the modified branch | |
# and with the provided changeset | |
REPOS="$1" | |
REV="$2" | |
TXN_NAME="$3" | |
tcApi="https://teamcity/httpAuth/app/rest/buildQueue" |
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 (c) 2015 Z-Software GmbH | |
// http://www.z-software.net/ | |
// Author: Oliver Iking | |
// | |
// | |
// 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 |
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; | |
namespace ZS.Tools | |
{ | |
/// <summary> | |
/// Adjusts the camera viewport so the actually drawn portion is always of a specific aspect ratio, | |
/// uninfluenced by the actual screen size. The viewport maximize its covered space. | |
/// </summary> | |
[RequireComponent(typeof(Camera)), ExecuteInEditMode] |
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.Generic; | |
using System.Linq; | |
using System.Text; | |
using UnityEngine; | |
namespace ZS.Tools | |
{ | |
/// <summary> | |
/// Provides means to deep-copy a TerrainData object because Unitys' built-in "Instantiate" method |
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 namespace RSG; | |
namespace PromisePlatformLayerUnity | |
{ | |
public class UnityPromisePlatformLayer : MonoBehaviour | |
{ | |
static IPromiseTimer gTimer = new ThreadsafePromiseTimer(); | |
// Public access to the promise timer | |
public static IPromiseTimer Timer { get { return gTimer; } } |