Unity Scripts
84 subscribers
67 photos
26 videos
11 files
34 links
هر چی کد بخواید برای یونیتی اینجا هست #C و JavaScript و برای پیدا کردن کد مورد نظر فقط کافی آن را بدون # سرچ کنید.


کانال های ما:
@Unitypersianforum

لینک انجمن:
https://t.me/joinchat/JNNaghKP-cPuU04-GCl4LA

مدیر:
@ErfanRafezi
Download Telegram
🔸حلقه ی تکرار while:
while(condition){
//code to be executed
}

✔️مثال:نمایش اعداد 1 تا 10
using System;
public class WhileExample
{
public static void Main(string[] args)
{
int i=1;
while(i<=10)
{
Console.WriteLine(i);
i++;
}
}
}

Output:

1
2
3
4
5
6
7
8
9
10


✔️مثال:حلقه ی While تو در تو :

using System;
public class WhileExample
{
public static void Main(string[] args)
{
int i=1;
while(i<=3)
{
int j = 1;
while (j <= 3)
{
Console.WriteLine(i+" "+j);
j++;
}
i++;
}
}
}


Output:

1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3

✔️مثال:حلقه ی while بی پایان
(شرط حلقه همیشه درست یا true باشد):
using System;
public class WhileExample
{
public static void Main(string[] args)
{
while(true)
{
Console.WriteLine("Infinitive While Loop");
}
}
}

Output:

Infinitive While Loop
Infinitive While Loop
Infinitive While Loop
Infinitive While Loop
Infinitive While Loop
ctrl+c
@Unity_Scripts
سلام دوستان شما به ما بگید که چه پکیجی رو دوست دارید ما بسازیم برای شما که بخریدش به ما بگید در آی دی زیر
@Erfan_R1380
و تمام این پکیج ها در کانال زیر
@Unity_Package
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour {


public GameObject[] Boxse;

public Vector3 TranslateSpeed = Vector3.zero;

public float MaxY = 20f;



void Start () {


StartCoroutine ("MoveBoxes");


}
void Updete(){


}






IEnumerator MoveBoxes(){


yield return new WaitForSeconds (2f);

foreach (GameObject Box in Boxse) {

while(Box.transform.position.y < MaxY){

Box.transform.Translate ( TranslateSpeed.x*Time.deltaTime,TranslateSpeed.y*Time.deltaTime,TranslateSpeed.z*Time.deltaTime);

yield return null;

}

}

}

}
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
// attach to UI Text component (with the full text already there)
public class UITextTypeWriter : MonoBehaviour {
Text txt;
string story;
void Awake () {
txt = GetComponent<Text> ();
story = txt.text;
txt.text = ""; // TODO: add optional delay when to start
StartCoroutine ("PlayText");
}
IEnumerator PlayText() {
foreach (char c in story) {
txt.text += c;
yield return new WaitForSeconds (0.125f);
}
}
}
اسکریپت اجرای فیلم در یونیتی👇
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
public MovieTexture film1;
void Start() {
renderer.material.mainTexture = film1;
film1.Play();
}
}
@Unity_Scripts
تایپ خودکار متن در یونیتی :
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
// attach to UI Text component (with the full text already there)
public class UITextTypeWriter : MonoBehaviour {
Text txt;
string story;
void Awake () {
txt = GetComponent<Text> ();
story = txt.text;
txt.text = ""; // TODO: add optional delay when to start
StartCoroutine ("PlayText");
}
IEnumerator PlayText() {
foreach (char c in story) {
txt.text += c;
yield return new WaitForSeconds (0.125f);
}
}
}
🔸عکس گرفتن از صفحه در یونیتی

Obsolete public static void CaptureScreenshot(string fileName, int superSize);
Obsolete public static void CaptureScreenshot(string filename);

filename مسیر ذخیره فایل اسکرین شات
superSize فاکتور افزایش کیفیت



✔️مثال:
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
void OnMouseDown() {
Application.CaptureScreenshot("Screenshot.png");
}
}
@Unity_Scripts
‍ Unity Learns

کلی آموزش های رایگان با بررسی و اشکال گیری آن همه در این کانال جهت عضویت در این کانال روی لینک های آبی کلیک کنید.

هر ماه به نفرات فعال در کانال و گروه تخفیف خرید پکیج های استثنایی خودمون رو هم بهتون می دیم.

_____________________

😂😁ما حتی تو تبلیغ ها مون هم مطلب یاد شما می دهیم

void Join () {

@Unity_Learns //کانالی پر پکیج آموزشی یونیتی
@Unity_Scripts //کانالی پر کد های یونیتی
@Unity_Package //کانالی پر پکیج کاربردی یونیتی

}
Forwarded from اتچ بات
Unity Learns

کانال پکیج های آموزشی یونیتی که اگه می خوای یونیتی یاد بگیری فقط کافی اینجا عضو بشی برای عضویت روی آیدی آبی پایین بزن.
به زودی پکیج بزرگی در این کانال منتشر می شود که مقدمش رو گزاشتم تو کانال @Unity_Package
الان در حال ظبط است.

@Unity_Learns
This media is not supported in your browser
VIEW IN TELEGRAM
گرافیک با آرامش
با موضوعات:
چگونه از فتوشاپ کسب درآمد کنیم؟
چگونه یونیتی را بیاموزیم؟
چگونه در انیمیشن سازی حرفه ای شویم؟
منبعی عظیم از هر چی که به گرافیک ربط پیدا کنه
متفاوت یاد بگیر: http://gerax.ir
نمایش یک پیام هر 12 ساعت:


using UnityEngine.UI;
using System.Collections;
public class Move : MonoBehaviour {

public Text label1;


void Update()
{

int intHour=System.DateTime.Now.Hour;

if(intHour==12 || intHour==24)
{
label1.text=intHour.toString();
}

}
تایپ خودکار متن در یونیتی :

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
// attach to UI Text component (with the full text already there)
public class UITextTypeWriter : MonoBehaviour {
Text txt;
string story;
void Awake () {
txt = GetComponent<Text> ();
story = txt.text;
txt.text = ""; // TODO: add optional delay when to start
StartCoroutine ("PlayText");
}
IEnumerator PlayText() {
foreach (char c in story) {
txt.text += c;
yield return new WaitForSeconds (0.125f);
}
}
}
🔸عکس گرفتن از صفحه در یونیتی

Obsolete public static void CaptureScreenshot(string fileName, int superSize);
Obsolete public static void CaptureScreenshot(string filename);

filename مسیر ذخیره فایل اسکرین شات
superSize فاکتور افزایش کیفیت



✔️مثال:
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
void OnMouseDown() {
Application.CaptureScreenshot("Screenshot.png");
}
}
آندرس هایلسبرگ:خالق سیشارپ
🔸او سازنده اصلی توربو پاسکال و طراح اصلی دلفی است. او هم اکنون برای مایکروسافت به عنوان طراح ارشد سی‌شارپ و توسعه‌دهندهٔ هسته تایپ‌اسکریپت کار می‌کند.
@Unity_Learn
چک کردن اتصال به اینترنت در یونیتی

@Unity_Learns



کد:




var url : String = "ادرس یک سایت مثلا گوگل";
function Start(){
var www : WWW = new WWW(url);
yield www;
if(www.isDone && www.bytesDownloaded > 0){
print("Done :) ");
}
if(www.isDone && www.bytesDownloaded == 0){
print("No connection :(");
}
}
مدرسه ها داره شروع می شه دست به کار شید.
روز جهانی برنامه نویس را به همه برنامه نویسان مبارک باد🌹🌹

@Unity_Scripts
Media is too big
VIEW IN TELEGRAM
معرفی پکیج آموزش یونیتی صفر تا صد بخش مبتدی
بخش مبتدی
۲۰ قسمت آموزش
۵ ساعت و ۳۰ دقیقه
حجم ۱ گیگ
قیمت ۱۰۰۰۰ تومان
Settings Menu For Unity
پکیج تنظیمات یونیتی

دانلود رایگان در کانال زیر:
@Unity_Package