Site icon Somnium Times

Unlocked C# Scripting in Somnium Space: A New Chapter for Creators

For years, Somnium Space has given builders an extraordinary canvas: persistent worlds, social presence, and the freedom to shape virtual environments that feel alive. Originally that canvas came with a boundary. Creators could design spaces, place objects, and use the tools Somnium provided, but the deeper logic of the world remained hidden to an extend.

That boundary has now been crossed.

With unlocked C# scripting, Somnium Space opens the full power of Unity’s programming language directly to world creators. This is not a small thing. It is a fundamental shift in what a Somnium world can be.

From Designed Spaces to Living Systems

Previously, a Somnium world was primarily a place you built and then inhabited. Behavior was limited to what the platform itself exposed (which included a powerful SDK with some powerful components by the way). Now, a world can contain custom logic that runs continuously, reacts to players, talks to external systems, and evolves over time.

In practical terms, this means creators are no longer limited to arranging objects. They can define how those objects behave, how information flows through the world, and how the world connects to systems that exist outside Somnium itself.

The result is a move toward programmable, networked experiences.

An Example: Custom Networking with WebSockets

One of the most powerful demonstrations of unlocked C# is custom networking.

Imagine a Somnium world that is no longer isolated. Instead, it maintains a live connection to an external server. That server can talk to a web-based control interface, to other applications, or even to multiple Somnium worlds at once.

Picture a world watched over by ruthless overlords who monitor every player’s every move, ready to unleash devastating force on anyone who steps out of line. At a high level the architecture could look like this:

High-level architecture of a custom networking solution

How the pieces work together:

Because the connection is built on WebSockets, the communication is bidirectional and low-latency. Changes made in the web interface appear almost immediately inside the world. Events that happen inside the world (an explosion, a player entering a zone, a drone completing a circuit) can be reflected instantly on the web side.

Connecting to an external server from Unity using C#
A Web UI spawning and tracking objects and players in a Somnium Space world.

This is no longer a one-way broadcast. It is a shared, living system.

Why This Matters

The example above is deliberately practical, but the implications are much broader.

Unlocked C# does not merely let creators “add scripts.” It lets them treat a Somnium world as a full software system that can participate in larger architectures. The world becomes one node in a network of tools, services, and interfaces.

That shift enables entirely new categories of experiences.

Creator Showcase: Patchwork by Bently

Community member Bently has been an active C# user in Somnium Space since the feature launched, creating some of the platform’s most innovative worlds. One standout example is his Minecraft world, which lets community members fully immerse themselves in the Minecraft experience right inside Somnium Space. He hasn’t stopped there. He continues to push the boundaries with another creation, called Patchwork.

We sat down with him to learn more about this project.

He explains: “The idea was a world that belongs to the community. Not a world I build and people walk around in, but one where the people in it decide what it looks like, what is in it, and what there is to explore. I just make the ground and the tools. I wanted to make it as easy as possible for anyone to take part. No Unity, no uploading a whole world, no waiting on me. Just walk up, claim a bit of land, and start placing stuff. Like a big shared quilt where every square is someone else’s.”

The idea was a world that belongs to the community.

“One Somnium world cut into a grid of 20 meter plots. You walk onto a free one, open your tablet, hit claim. It gives you a code and you go to the the web editor in your browser. From there you place cubes, spheres, stairs, lights, text, photos, video players, mirrors, your own 3D models, doors, triggers, physics props, all that. Everything you place shows up in the world straight away for everyone standing in it. Your neighbours’ builds render right next to yours. You can add friends as collaborators and build the same plot together. The world grows and changes on its own because its the people using it who are changing it.”

Inside the Patchwork editor

When asked about the tech, he lit up.

“The tech side is where it gets fun. The world state lives in SpacetimeDB. Thats the single source of truth. Plots and props are tables, and every edit goes through a small Rust module with reducers. The reducers check ownership so you can only touch your own plot, and that check happens in the database itself, not in my client code.”

The world state lives in SpacetimeDB. Thats the single source of truth.

“The Unity side connects to SpacetimeDB directly using the C# SDK and subscribes to the prop table. So when someone moves a cube in their browser, Unity gets the row update pushed to it. No polling, no middleman. The web editor does the same thing from the browser with the TypeScript SDK. Both clients are just listening to the same tables.”

None of this would work without unlocked C# in Somnium.

“There is still a small Bun server in the middle for the bits that arent world state. Claim codes and PIN login, image and model uploads, collaborators, admin tools, and presence so you can see other peoples cursors and where players are standing. That stuff sits in SQLite. But the actual world, what is where and who owns it, is SpacetimeDB all the way.”

Bently relaxing in VR in his Patchwork world

“None of this would work without unlocked C# in Somnium. The tablet app is custom, the plot streaming is custom, the whole networking layer is custom. The SDK gives me the player identity and the tablet hooks, and I get to do whatever I want on top of that.”

Other High-Level Use Cases

With unlocked C# scripting in Somnium Space, the sky is the limit. Here are some other use cases:

Persistent Live Operations A world can be monitored and controlled from outside. Event organizers, educators, or simulation operators can adjust conditions, spawn content, or respond to player activity without being physically present inside the world.

Cross-Reality Command & Control The same architecture can connect a Somnium world to real-world data feeds, external sensors, or other virtual environments. A single web dashboard can orchestrate activity across multiple spaces.

Autonomous Systems Inside the World Drones, patrols, environmental systems, or narrative agents can run their own logic in C#, report state outward, and receive high-level goals from external systems.

Collaborative Creation Tools Multiple people can work on the same world simultaneously through different interfaces. One person building inside Somnium, another managing content from a browser, a third analyzing data from a separate application.

Training, Simulation & Research Because the world can both send and receive structured data, it becomes suitable for structured experiments, training scenarios, and research setups that require precise control and logging.

Hybrid Experiences A concert, exhibition, or game can have a public-facing web layer and a deep immersive layer inside Somnium, both kept in sync through the same networking backbone.

A New Creative Ceiling

Unlocked C# scripting does not replace the existing Somnium tools. It multiplies them.

Creators who prefer visual workflows can continue to work as before. Those who want to go further now have a direct path into the full expressive power of Unity. And those who want to connect their worlds to the wider digital ecosystem finally have a clean, supported way to do so.

The most interesting work will likely sit at the intersection: worlds that feel native to Somnium, yet participate in larger systems of data, control, and interaction.

The canvas is no longer just a place to build. It is a place that can think, react, and talk to the rest of the digital world.

That is the real significance of unlocked C# scripting in Somnium Space.

About Somnium Space

Somnium Space, the company behind the VR1, also runs a blockchain-based virtual reality platform that allows users to create, experience, and monetize content and applications. The platform is committed to building a decentralized and immersive VR world that offers users a unique and engaging experience.

Web: https://somniumspace.com

Discord: https://discord.gg/somniumspace

Authencity: https://authencity.io/user/somniumspace

X: https://x.com/SomniumSpace

Follow the Somnium Times

Authencity: https://authencity.io/user/SomniumTimes

X: https://x.com/SomniumTimes

YouTube: https://www.youtube.com/@SomniumTimes

Instagram: https://www.instagram.com/somniumtimes/

Exit mobile version