top of page
  • Writer's pictureCraig

FREE WHITEBOARD ASSET for unity URP

Updated: Jul 30

Hey guys, I heard you like whiteboards. Well I had lots of amazing positive feedback on the one I made for Airport X-Ray Simulator, and even though it was just a wall filler in my game, it was fun to make. Anyway I'm giving it away for free! Read below for more details!


Click below to download the unity package


Quick disclaimer...

This asset was created by a self-taught developer with the help of ChatGPT.

It's likely that parts of the script and setup are unoptimized and should be used with caution in projects. It was also created and tested in Unity URP and may not work in other render piplines.


Things to note:

  • In my game project I used a 3rd party asset to save and load the texture during game sessions. I have removed this code, so saving and loading will not be supported out of the box. Render textures themselves do seem to persist through playmode but I'm unsure if it works in builds - to achieve this you'd need to uncheck useFirstImage on the prefabs script.

  • Keep an eye on the render texture size! It's defaulting to a 2048x2048 size. Adjusting the Anti-Aliasing samples also GREATLY increase the size, it can be anywhere from 96mb to 0.85GB!


How to setup:

  1. Simply download the unity package and drag it into your unity project.

  2. Once imported, navigate to the "Whiteboard" folder.

  3. Once opened, you can simply drag out the _Whiteboard prefab into your scene.


This script works based on mouse position raycasting and interactDistance variable which means that ideally either a first person character controller, or a static camera looking at the whiteboard with an unlocked cursor is required! - A very basic first person controller is included.


Some things might be a bit janky, but it's free after all:

  • To modify the default texture on the whiteboard, it seems to work best using a power of two texture, even though the whiteboard itself is not square.

An example...

It's recommended to modify the included First Run Texture thats included for best results.


  • Drawn lines are a little wobbly. When drawing like this in games, you're typically drawing or modifying a texture to add a brush texture of some sort, these are typically round, and if you draw too fast you see noticable dots. To correct this a DrawBetween method exists which calculates the space between 2 points and fills them in. The smoothSteps variable is used to determine how often to do this, increasing it too high will greatly reduce performance, so keeping it running smoothly, the lines will appear a little "edgy".



Now if you've got this far, I'd love it if you would be willing to wishlist Airport X-Ray Simulator on Steam. This asset is completely free, no obligation to wishlist but it would help me out!





607 views0 comments

Recent Posts

See All

Comments


bottom of page