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";
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
namespace UTJ | |
{ | |
public class WebGLUtility | |
{ | |
private static Type httpServerEditorWrapperType; |
Apple recently unveiled the Vision Pro. This type of device is mostly designed for augmented reality (AR), in the sense that it should be able to throw 3D models and rendering combined into a camera.
Normally with pass-through AR, one would expect to get the camera feed as an image and maybe some environment cubemap generated from the camera to apply proper lighting into the objects.
using Unity.Netcode; | |
namespace R3.Trigger | |
{ | |
public static class UnityNetcodeR3Extensions | |
{ | |
public static Observable<(T previousValue, T newValue)> AsObservable<T>(this NetworkVariable<T> networkVariable) | |
{ | |
return Observable.FromEvent<NetworkVariable<T>.OnValueChangedDelegate, (T, T)>( | |
h => (previousValue, newValue) => h((previousValue, newValue)), |
import SwiftUI | |
struct ContentView: View { | |
@State var theta: Double = 0 | |
let radius: Double = 60 | |
let colors: [Color] = [.purple, .red, .yellow, .blue, .green] | |
var body: some View { | |
ZStack { | |
ForEach(Array(colors.enumerated()), id: \.offset) { offset, style in |
using System; | |
using System.Net; | |
using System.Net.Http; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
using UnityEngine.Networking; |
/** | |
* Proximity Fade shader include | |
* | |
* Based on Godot's proximity fade shader feature: | |
* https://github.com/godotengine/godot/blob/97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b/scene/resources/material.cpp#L1643 | |
* | |
* Usage: | |
// Include snippet | |
#include "proximity-fade.gdshaderinc" | |