There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull
example requires it.
Consider adopting the new property pattern, wherever you use IsNullOrEmpty
.
string? hello = "hello world";
There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull
example requires it.
Consider adopting the new property pattern, wherever you use IsNullOrEmpty
.
string? hello = "hello world";
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; | |
public class GrabScreenFeature : ScriptableRendererFeature | |
{ | |
[System.Serializable] | |
public class Settings |
using UnityEngine; | |
using UnityEditor; | |
/// <summary> | |
/// This editor utility can lock/unlock unity script compile from menu item. | |
/// See more https://raspberly.hateblo.jp/entry/InvalidateUnityCompile | |
/// </summary> | |
public static class CompileLocker | |
{ | |
[MenuItem("Compile/Lock", false, 1)] |
const std = @import("std"); | |
const Builder = std.build.Builder; | |
const Step = std.build.Step; | |
pub fn build(b: *Builder) void { | |
const target = b.standardTargetOptions(.{}); | |
const mode = b.standardReleaseOptions(); | |
const exe = b.addExecutable("hw", "hw.zig"); | |
exe.setTarget(target); |
using UnityEngine; | |
using UnityEngine.XR; | |
using UnityEngine.XR.Management; | |
public class XRSubSystemTest : MonoBehaviour | |
{ | |
public void Start() | |
{ | |
var xrSettings = XRGeneralSettings.Instance; | |
if (xrSettings == null) |
更新: | 2018-08-20 |
---|---|
作者: | @voluntas |
バージョン: | 18.8.3 |
URL: | https://voluntas.github.io/ |
void OnPhotoCaptured(PhotoCapture.PhotoCaptureResult result, PhotoCaptureFrame photoCaptureFrame) | |
{ | |
Matrix4x4 cameraToWorldMatrix; | |
photoCaptureFrame.TryGetCameraToWorldMatrix(out cameraToWorldMatrix); | |
Matrix4x4 projectionMatrix; | |
photoCaptureFrame.TryGetProjectionMatrix(out projectionMatrix); | |
var imagePosZeroToOne = new Vector2(pixelPos.x / imageWidth, 1 - (pixelPos.y / imageHeight)); | |
var imagePosProjected = (imagePosZeroToOne * 2) - new Vector2(1, 1); // -1 to 1 space |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
public class KeyboardEventArgs : EventArgs | |
{ | |
public int KeyCode { get; } |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Video; | |
public class SmoothVideoPlaylist : MonoBehaviour { | |
// to smoothly cut between two videos, we need two VideoPlayers | |
// make sure you create two VideoPlayers and assign them in the Inspector | |
public VideoPlayer activeCam, otherCam; | |