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 Sandbox; | |
using Sandbox.Hooks; | |
using Sandbox.UI; | |
using Sandbox.UI.Construct; | |
using System; | |
using System.Collections.Generic; | |
namespace Sandbox.UI | |
{ |
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.Linq; | |
using UnityEngine; | |
namespace Facepunch | |
{ | |
public class VirtualScroll : MonoBehaviour | |
{ |
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
TimeUntil timeUntilBurp; | |
void Update() | |
{ | |
if ( timeUntilBurp <= 0 ) | |
{ | |
Burp(); | |
timeUntilBurp = 5; | |
} | |
} |
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 struct TimeUntil | |
{ | |
float time; | |
public static implicit operator float( TimeUntil ts ) | |
{ | |
return ts.time - Time.time; | |
} | |
public static implicit operator TimeUntil( float ts ) |
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; | |
public class CreateNewMission : EditorWindow | |
{ | |
string MissionName = "Mission Name"; | |
string FolderName = "MissionName"; | |
void OnGUI() | |
{ |
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 System; | |
public class ScreenshotCamera | |
{ | |
static Vector3 FocusPoint; | |
static float Aperture = 20.0f; | |
RealTimeSince timeSinceMessage; | |
string MessageText; |
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 Facepunch.Steamworks; | |
using UnityEngine.UI; | |
// | |
// To change at runtime set SteamId then call Fetch() | |
// | |
public class SteamAvatar : MonoBehaviour | |
{ | |
public ulong SteamId; |
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 System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class FileSystem_AssetBundles : IFileSystem | |
{ | |
public static bool isError = false; | |
public static string loadingError = ""; | |
public static FileSystem_AssetBundles Instance = null; |
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 static void Build( string strPath, BuildTarget target ) | |
{ | |
if ( !System.IO.Directory.Exists( strPath ) ) | |
System.IO.Directory.CreateDirectory( strPath ); | |
AssetBundleBuild[] existingBundles = AssetDatabase.GetAllAssetBundleNames().Select( x => new AssetBundleBuild() { assetBundleName = x, assetBundleVariant = "", assetNames = AssetDatabase.GetAssetPathsFromAssetBundle( x ) } ).ToArray(); | |
EditorUtility.DisplayProgressBar( "SplitContent", "", 0 ); | |
var newBundles = SplitContent( existingBundles ); |