Welcome to the guide for using Ciihuy Curved Mesh.This tool allows you to automatically create pipe or cable meshes in Unity, directly from points you define. First, add the CiihuyCurvedMesh script to an empty GameObject in your scene.Then, in the Inspector, you’ll see the Points list. Add several Empty GameObjects to this list as your…
Category: C#
Advanced Blinking Marker Script to show objects position in your game canvas
Here is advanced version of blinking marker script that you see in my video above: To make the marker object interesting, add some animation to it, for example blinking, fading, etc. I have old version of this script in this post: https://thirteenov.ciihuy.com/blinking-marker-unity-screen-space-marker-overlay-script/
Building a JavaScript ↔ C# Bridge with WebView2 in .NET 8
As desktop development evolves, integrating web-based interfaces with powerful C# backend logic is becoming more common. Thanks to Microsoft’s WebView2, developers can now build hybrid desktop applications that combine the flexibility of HTML/JavaScript with the performance of native .NET. One of WebView2’s most powerful features is two-way communication between JavaScript and C#—commonly called a bridge….
How to find large files that is used and referenced in your Unity project
I will share a script that will list top biggest files referenced and used in your Unity project so you can optimize these files. Here is the script: FindReferencedLargeAssets To run the script, go to tool menu and click the Find Referenced Large Assets inside it. Make sure you have this script inside Editor folder…
How to copy position of another object in Unity smoothly
Imagine we have a non moving object and there is another object that is moving. Below is a script that we can attach it to the non moving object, to move exactly same as that moving object (instead of making it child of that object). But the movement following mechanism here is too fast. What…
Unity transform.LookAt but slowly, not suddenly rotating towards target
I often use transform.LookAt function in Unity but still I can not understand how to make the object rotation not to quick. I mean, look at this script: This script will rotate the object (with this script attached) towards the transform target (the object that we look at to), but the rotation is too fast….
Simple script to set and change the skybox, fog and so on in Unity
In this article, we will discuss how to create a script in Unity that automatically applies several important settings when the game starts. This script will enable fog, change the skybox material, destroy objects with a specific tag, and spawn a prefab at a specified location. All of these tasks will be executed when the…
Optimizing Performance in Open-World Games: A Simple Unity Script for Enabling/Disabling Static Objects Based on Player Distance
When developing large-scale open-world games, one of the biggest challenges is maintaining performance while creating a dynamic and immersive environment. One way to optimize game performance is by managing the number of objects that are active in the scene at any given time. In this article, we’ll explore a simple yet effective Unity script that…
Simple example how to interact with sqlite database in Unity and C#
Here is a script called SQLiteManager: Explanation: Make sure to import Mono.Data.Sqlite and add the SQLite package to your Unity project (sqlite3.dll for Windows, libsqlite3.so for Android if needed).
Unity C# Third Person Camera Occlusion Script
Here is a C# script for Unity that ensures a third-person camera moves closer to the player when an object obstructs the view. This script utilizes raycasting to detect occlusion and adjust the camera’s position accordingly. How It Works: You can adjust:
Very simple unity C# code to integrate Google Play Asset Bundle on runtime
Here’s a simple Unity C# script to load an AssetBundle from Google Play Asset Delivery at runtime. This example assumes you have already set up Google Play Asset Delivery in your Unity project and uploaded asset bundles to Google Play Console. Steps: C# Code for Loading an AssetBundle at Runtime This script demonstrates how to…
Very simple example script to use yasirkula’s Native File Picker to load image file from Android device then showing it on UI canvas in Unity
This free asset from yasurkula is very nice, it allows you to pick image file from your Android device easily, it also deals with app permission so you can just call a single function to request permission, so easy! Here is the link to the Native File Picker in Asset Store: https://assetstore.unity.com/packages/tools/integration/native-file-picker-for-android-ios-173238 In below is…
Unity random mesh spawner at certain position C# script
In this blog post I will share a simple script that I’ve made to randomize what game object to be instantiated at a certain position as a child game object. For example, a car game object needs random accessories to be instantiated at certain area of the car… bla bla bla. This is the script:…
How to make a mobile airplane / aircraft simulator game easily
Hello guys. There is a nice free and open source project on GitHub that you can use to make your airplane mobile game. Check out this aircraft physic source code on GitHub: https://github.com/gasgiant/Aircraft-Physics/tree/master Well, the example scene is working fine and you can control your airplane using keyboard. But what if we want to make…
How to make Unity multiplayer game using Photon Fusion
In this blog post I will share some video tutorials about how to make your own Unity multiplayer game using Photon Fusion for free… Here is the list of videos: 1. Introduction 2. Basic example 3. Player Nickname – Basic 4. Player Nickname – Random Nickname 5. Player Nickname – Custom Nickname 6. Objects facing…
How to make “Friend Follows Player” in Unity Game Development
This is a video tutorial showing you how to make a friendly object/character that will follow the player object anywhere it goes. For example in this game I have FPS character controller, and wherever I go I can make that friendly object walks following me (the player). This is the script that I used in…
Tutorial how to make rocket launcher shooting game in Unity
Hi, in this blog post I will start a tutorial series about how to make rocket launcher shooting game in Unity. I already have the game ready. It is a FPS game with Skibidi Toilet monsters around and we need to escape and run away from them. But it would be more interesting if we…
Simple Example to begin with Photon PUN multiplayer game development
This simple script is to connect the game to Photon server and instantiate a player prefab on your Resources folder. Make sure your player prefab has PhotonView component in it. Check out this video on how to use it: Ready to develop more? Watch out the next steps of what we can do with Photon…
Super Silly Simple Unity FPS WASD player movement script
In case you need a simple script to move your game character using WASD buttons, feel free to use it:
Super simple way to load any image from URL and show it as a UI Image in Unity
Hey dude, here I’m going to share a simple script to load any image you can have from URL accross internet and show it as a UI Image inside your Unity game. Create a script name it UiImageFromUrl.cs and copy and paste the script content below: Then attach the script to a UI Image object…