> For the complete documentation index, see [llms.txt](https://www.saladpuk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.saladpuk.com/games/beginner/unity.md).

# Unity คือไย?

## 🤔 Unity ทำไยได้ ?

ก่อนจะเริ่มเขียนเกมส์ เรามาดูกันก่อนดีกว่าว่าเจ้า Unity มันคุ้มค่าที่จะสละเวลาอันไร้ค่าของเราไปให้มันหรือเปล่า?

![](/files/-LzbjsEAxP4-TXiePHA4)

โดยอธิบายแบบรวดรัดก็คือ มันเอาไว้ **สร้างเกมส์** ที่เขียนครั้งเดียวแล้วเอาไปเล่นได้หลายๆที่ Android, iOS, Mac, Windows, Linux, Apple Tv,  XBox One, Play Station, Nitendo Switch, Website (ซึ่งเราเรียกของแบบนี้ว่า Cross Platform นั่นเอง) แต่สิ่งที่ต่างจากเดิมก็คือเดี๋ยวนี้ Unity มันแจ่มขนาดเราเอาไปสร้างเป็นหนัง หรือ ออกแบบโครงสร้างทางวิศวะกรรมได้เลยนั่นเอง

{% hint style="success" %}
สำหรับใครที่ไม่อยากพลาดอัพเดทบทความใหม่ๆ สามารถเข้าไปกด Like เพื่อรับข่าวสารใหม่ๆจาก [**Facebook Blog: Mr.Saladpuk**](https://www.facebook.com/mr.saladpuk) ได้นะครับ 😍
{% endhint %}

## 🤔 สร้างได้แต่เกมส์กากๆป่าว ?

เพื่อนๆบางคนที่เคยใช้โปรแกรมสร้างเกมส์แบบอื่น อาจจะยังติดภาพว่าส่วนใหญ่โปรแกรมสร้างเกมส์ก็จะสร้างได้แต่เกมส์กากๆเท่านั้นแหละ แต่เสียใจด้วยเพราะเจ้า Unity สามารถนำไปสร้างเกมส์ฟอร์มยักษ์ได้นะจ๊ะ ไม่เชื่อลองดูตัวอย่างหนังที่ใช้ Unity Render ภาพสดๆดูซิว่ามันสามารถทำแบบนี้ได้

{% embed url="<https://www.youtube.com/watch?v=34K8YJOMDRY>" %}

> ตัวอย่างหนังสั้น The Heretic เป็นการโชว์ภาพในเกมส์แบบ real-time cinematic โดยใช้ Resolution 1440p ซึ่งทำได้ 30 fps บน PC นั่นเอง (ทำได้ขนาดนี้ DotA ก็เขียนได้สบายแล้วล่ะ)

ส่วนเกมส์ดังๆเจ้าไหนใช้ Unity บ้างลองไปดูได้จากลิงค์นี้เอาละกัน <https://unity.com/madewith>

## 🤔 สร้างเกมส์แนวไหนได้บ้าง ?

ข้อนี้ขอบอกเลยว่าได้ทุกรูปแบบ ไม่ว่าจะเป็น 2D, 3D, 2.5D, AR, VR ได้โม๊ดดดดดดดดด

### 2D - Cuphead

{% embed url="<https://www.youtube.com/watch?v=NN-9SQXoi50>" %}

### 3D - Praey for the Gods

{% embed url="<https://www.youtube.com/watch?v=8Zulk8c_8LY>" %}

### 2.5D - Hearthstone

{% embed url="<https://www.youtube.com/watch?v=iVBoF74_-2M>" %}

## 🤔 ใช้ภาษาไรเขียน ?

![](/files/-LzbtTMSRusGT-XcK-0p)

โลโก้แปะตัวใหญ่ๆเลย ภาษา C# นะซี๊!! ผมบอกแล้วเรียนภาษานี้ตัวเดียวเขียนได้ครอบจักรวาล ตั้งแต่ front-end ยัน back-end ถีบไปจนถึง Mobile, Games, IoT, AI วู๊วววววขี้เกียจร่ายยาวเอาเป็นว่าผมจบที่ภาษานี้แหละหากินได้ตลอดชาติละ

## 🤔 เขียนโค้ดไม่เป็นทำเกมส์ได้ป่าว ?

ยินดีด้วย Unity ตัวล่าสุดสามารถให้เราสร้างเกมส์โดยที่ไม่ต้องเขียนโค้ดเลยแม้แต่บรรทัดเดียวได้แล้ว โดยใช้เจ้าสิ่งที่ชื่อว่า Visual scripting นั่นเอง

![](/files/-LzbuJYahtp1gMFSXM90)

## 🤔 อยากสอนลูกเขียนโค้ด ?

แนะนำสำหรับพ่อแม่ที่มีลูกแล้วอยากให้เขาได้เรียน Logic ผมแนะนำ Unity เลยเพราะมันทำให้เด็กได้สนุกไปกับการสร้างของที่เขารัก ซึ่งเป็นอีกตัวเลือกที่ดีมากสำหรับเด็กที่โตแล้ว ส่วนถ้าเป็นลูกเล็กผมแนะนำไปศึกษาจาก [https://scratch.mit.edu](https://scratch.mit.edu/) จะง่ายกว่านะจ๊ะ

![](/files/-LzbvGOJd-o3nVkWT8h9)

## 💖 บทสรุป

อ่านมาถึงขนาดนี้ได้ก็แสดงว่าน่าจะเป็นผู้ฝักใฝ่ในรสพระเกมส์บ้างพอตัวแล้วล่ะ ซึ่งผมบอกเลยว่ามันง่ายม๊วกๆ เพราะผมลองศึกษามันช่วงปีใหม่ 1 อาทิตย์ก็สามารถเขียนเกมส์ได้ละ (อวดๆ) และสำหรับเพื่อนๆที่มีฝันอยากทำเกมส์เป็นของตัวเอง (เหมือนกับผม) หรืออยากหัดเขียนโปรแกรม ผมแนะนำลองดูซีรี่ตัวนี้ไล่อ่านตั้งแต่บทความแรกไปเรื่อยๆได้เลย เพราะมันจะเขียนโดยเรียงความรู้ต่อยอดไปเรื่อยๆนะจ๊ะ ส่วนใครที่สนใจอยากเรียน C# ให้แจ่มๆสามารถไปดูได้จากซีรี่ตัวนี้เบย <https://www.saladpuk.com/beginner-1/csharp101>

![ตัวอย่างเกมส์ที่หัดเขียนใช้เวลาทั้งหมด 5 วัน (โขมยภาพจากที่อื่นๆมาลองเล่นไปทั่ว ฮี่ๆ)](/files/-Lzbxsqw97kcQRAX3Zsx)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.saladpuk.com/games/beginner/unity.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
