
Connect 4 Unity Game Asset by Ray Vision Studio: A customizable template with two-player & AI modes, smooth disc-dragging, win line animation, and clean UI. Ideal for indie devs & educators.Connect 4 Game Asset by Ray Vision Studio - Create a classic Connect 4 game with this complete, easy-to-use Unity template! This asset delivers a polished board game experience, saving you time and effort.Build a 6x7 grid game with two-player and AI modes , featuring a smart AI with adjustable difficulty (levels 1–7) powered by the Minimax algorithm. Enjoy smooth disc-dragging controls with column highlights, a dynamic win line animation for winning moves, and a clean UI using TextMeshPro for clear game updates. The modular C# code lets you customize board size, disc designs, AI settings, and UI to suit your project.Key Features:- Two-player and AI modes for versatile gameplay- Smooth disc dragging with column highlighting- Smart AI with 7 difficulty levels- Animated win line for winning combinations- Fully customizable board, discs, and UI- Visual debugging with Gizmos for easy setup- Detailed documentation included- Supports Windows, macOS, Android, and iOSWhy This Asset?Ray Vision Studio’s Connect 4 template is a reliable, high-quality solution for any Unity project. The ready-to-use demo scene and clean code make integration fast and simple, letting you focus on creating.Requirements:- Unity 2019.4 or later- TextMeshPro (included in Unity)- Mouse or touch inputStart Now!Add this professional Connect 4 game to your project. Technical Details: Connect 4 Game Asset by Ray Vision StudioThis Unity asset delivers a complete, customizable Connect 4 game with two scenes: MainMenu and Connect4. Built with clean C# code, it provides a reliable board game solution with two-player and AI modes, intuitive controls, and a polished user interface.Scene Structure:- MainMenu Scene: Lets players choose game mode (Two-Player or AI) and AI difficulty (levels 1–7). Uses TextMeshPro UI for mode selection and difficulty sliders, transitioning smoothly to the Connect4 scene.- Connect4 Scene: Hosts the core game with a 6x7 grid, disc-dragging mechanics, AI logic, and win/draw detection. Includes a demo setup with prefabs for quick integration.Core Components:- GameBoard.cs: Manages the 6x7 grid, disc placement, win checking (horizontal, vertical, diagonal), and column highlighting. Uses a Cell struct for grid state.- Connect4Game.cs: Controls game flow, player turns, and AI integration. Handles disc dragging with mouse/touch input and triggers events for UI updates.- AIPlayer.cs: Uses a Minimax algorithm with alpha-beta pruning for AI moves. Adjustable difficulty (1–7) sets depth and randomness.- WinLineRenderer.cs: Draws a LineRenderer to animate winning lines (4 discs) with customizable width, colors, and gradient options.- UIManager.cs: Updates TextMeshPro UI for game state, player turns, and win/draw outcomes. Displays a win panel with a 2-second delay.- EventManager.cs: Uses C# events for communication between scripts for game initialization, turn changes, and win/draw states.- Player.cs & Cell.cs: Define player properties (name, color, disc prefab) and grid cell states (occupied, color).Technical Features:- Game Modes: Two-player mode for head-to-head play or AI mode with 7 difficulty levels, set in the MainMenu scene.- Input System: Mouse/touch-based disc dragging with real-time column highlighting for precise placement.- AI Logic: Minimax algorithm evaluates board states, favoring center columns and potential wins. Difficulty adjusts depth (1–7) and random move chance (0–50%).- Visuals: Gizmos for debugging grid and game state. Customizable disc prefabs (RedDiscPrefab, YellowDiscPrefab) and win line animations.- UI: TextMeshPro-based UI with dynamic updates for turns and results. Win panel appears with a 2-second delay.- Customization: Adjust board size, disc prefabs, AI settings, and UI via Inspector or code. Modular scripts allow easy extensions.- Performance: Optimized with async disc-dropping animations and efficient grid checks. No external file I/O or network calls.Requirements:- Unity 2019.4 or later- TextMeshPro (included in Unity)- Supports Windows, macOS, Android, iOS- Mouse or touch inputSetup:1. Import the asset into Unity.2. Open the MainMenu scene to configure game mode and AI difficulty.3. Transition to the Connect4 scene for gameplay.4. Assign prefabs (RedDiscPrefab, YellowDiscPrefab, ColumnHighlightPrefab, DiscContainer) in the Inspector.5. Customize settings like board size or AI difficulty as needed.This asset offers a dependable, easy-to-use solution for any Unity developer creating a Connect 4 game.This Package was created by the author with ai assistance for debugging and development support, and was fully reviewed and finalized manualy.