@ -1,70 +0,0 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
using System.IO; | |||||
using UnityEditor; | |||||
[RequireComponent(typeof(Camera))] | |||||
public class Renderator_FREE_EN : MonoBehaviour { | |||||
public int multipler; // multipling Game window resolution | |||||
public KeyCode render; // press it to make render | |||||
public bool renderAtStart; // if true it will render at start | |||||
public string path; // path where renders will be saved | |||||
void Start () | |||||
{ | |||||
if(path == "") | |||||
{ | |||||
if(!Directory.Exists("Assets/Screenshots")) // check if folder exist | |||||
Directory.CreateDirectory("Assets/Screenshots"); // if not it creates one | |||||
}else if(!Directory.Exists(path)) // the same for our path | |||||
Directory.CreateDirectory(path); | |||||
if(renderAtStart) | |||||
{ | |||||
if(path == "") // saving in Asset folder | |||||
{ | |||||
ScreenCapture.CaptureScreenshot("Assets/Screenshots/Render" // path to folder with renders and firts part of the name (Render) | |||||
+ System.DateTime.Now.ToString("_yyyy-MM-dd_") // giving date to name | |||||
+ System.DateTime.Now.ToString ("hh-mm-ss_") // giving current time to name | |||||
+ ".png", multipler); //screenshot with resolution multipler | |||||
}else | |||||
{ // saving in our folder we choose | |||||
ScreenCapture.CaptureScreenshot(path + "/Render" // path to folder with renders and firts part of the name (Render) | |||||
+ System.DateTime.Now.ToString("_yyyy-MM-dd_") // giving date to name | |||||
+ System.DateTime.Now.ToString ("hh-mm-ss_") // giving current time to name | |||||
+ ".png", multipler); //screenshot with resolution multipler | |||||
} | |||||
} | |||||
} | |||||
void Update() | |||||
{ | |||||
if(Input.GetKeyDown(render)) | |||||
{ | |||||
if(path == "") // saving in Asset folder | |||||
{ | |||||
ScreenCapture.CaptureScreenshot("Assets/Screenshots/Render" // path to folder with renders and firts part of the name (Render) | |||||
+ System.DateTime.Now.ToString("_yyyy-MM-dd_") // giving date to name | |||||
+ System.DateTime.Now.ToString ("hh-mm-ss_") // giving current time to name | |||||
+ ".png", multipler); //screenshot with resolution multipler | |||||
}else | |||||
{ // saving in our folder we choose | |||||
ScreenCapture.CaptureScreenshot(path + "/Render" // path to folder with renders and firts part of the name (Render) | |||||
+ System.DateTime.Now.ToString("_yyyy-MM-dd_") // giving date to name | |||||
+ System.DateTime.Now.ToString ("hh-mm-ss_") // giving current time to name | |||||
+ ".png", multipler); //screenshot with resolution multipler | |||||
} | |||||
} | |||||
} | |||||
[ContextMenu("Choose save folder")] | |||||
void Kalesony() | |||||
{ | |||||
string piach = EditorUtility.OpenFolderPanel("Choose save folder", "", ""); | |||||
if( piach.Length != 0 ) | |||||
{ | |||||
path = piach; | |||||
} | |||||
} | |||||
} |
@ -1,12 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 1a7b288fe101458479bf42a1052ae34d | |||||
timeCreated: 1454087420 | |||||
licenseType: Store | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,69 +0,0 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
using System.IO; | |||||
using UnityEditor; | |||||
[RequireComponent(typeof(Camera))] | |||||
public class Renderator_FREE_PL : MonoBehaviour { | |||||
public int mnoznikRozdzielczosci; // Mnoży wirtualnie okno Game | |||||
public KeyCode render; // tym przyciskiem robimy render | |||||
public bool renderNaStarcie; // jak jest włączony to renderuje pierwszą klatkę | |||||
public string sciezka; // ścieżka, gdzie rendery będą zapisywane | |||||
void Start () | |||||
{ | |||||
if(sciezka == "") | |||||
{ | |||||
if(!Directory.Exists("Assets/Screenshots")) // sprawdzanie czy folder istnieje | |||||
Directory.CreateDirectory("Assets/Screenshots"); // jeśli nie to go tworzy | |||||
}else if(!Directory.Exists(sciezka)) // tak samo dla wybranego przez nas | |||||
Directory.CreateDirectory(sciezka); | |||||
if(renderNaStarcie) | |||||
{ | |||||
if(sciezka == "") // zapisze w folderze z assetami | |||||
{ | |||||
ScreenCapture.CaptureScreenshot("Assets/Screenshots/Render" // ścieżka do pliku oraz początek nazwy (Render) | |||||
+ System.DateTime.Now.ToString("_yyyy-MM-dd_") // dodanie daty do nazwy | |||||
+ System.DateTime.Now.ToString ("hh-mm-ss_") // dodanie obecnej godziny do nazwy | |||||
+ ".png", mnoznikRozdzielczosci); //screenshot z mnożnikiem rozdzielczości | |||||
}else | |||||
{ // zapisze w wybranym folderze | |||||
ScreenCapture.CaptureScreenshot(sciezka + "/Render" // ścieżka do pliku oraz początek nazwy (Render) | |||||
+ System.DateTime.Now.ToString("_yyyy-MM-dd_") // dodanie daty do nazwy | |||||
+ System.DateTime.Now.ToString ("hh-mm-ss_") // dodanie obecnej godziny do nazwy | |||||
+ ".png", mnoznikRozdzielczosci); //screenshot z mnożnikiem rozdzielczości); | |||||
} | |||||
} | |||||
} | |||||
void Update() | |||||
{ | |||||
if(Input.GetKeyDown(render)) | |||||
{ | |||||
if(sciezka == "") | |||||
{ | |||||
ScreenCapture.CaptureScreenshot("Assets/Screenshots/Render" // ścieżka do pliku oraz początek nazwy (Render) | |||||
+ System.DateTime.Now.ToString("_yyyy-MM-dd_") // dodanie daty do nazwy | |||||
+ System.DateTime.Now.ToString ("hh-mm-ss_") // dodanie obecnej godziny do nazwy | |||||
+ ".png", mnoznikRozdzielczosci); //screenshot z mnożnikiem rozdzielczości | |||||
} | |||||
else | |||||
{ | |||||
ScreenCapture.CaptureScreenshot(sciezka + "/Render" // ścieżka do pliku oraz początek nazwy (Render) | |||||
+ System.DateTime.Now.ToString("_yyyy-MM-dd_") // dodanie daty do nazwy | |||||
+ System.DateTime.Now.ToString ("hh-mm-ss_") // dodanie obecnej godziny do nazwy | |||||
+ ".png", mnoznikRozdzielczosci); //screenshot z mnożnikiem rozdzielczości); | |||||
} | |||||
} | |||||
} | |||||
[ContextMenu("Wybierz folder do zapisu")] | |||||
void Kalesony() | |||||
{ | |||||
string piach = EditorUtility.OpenFolderPanel("Wybierz folder do zapisu", "", ""); | |||||
if( piach.Length != 0 ) | |||||
{ | |||||
sciezka = piach; | |||||
} | |||||
} | |||||
} |
@ -1,12 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 0d29750727f1f634980f33b5f067e42d | |||||
timeCreated: 1454087420 | |||||
licenseType: Store | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,26 +0,0 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
[RequireComponent(typeof(Camera))] | |||||
public class wireframe : MonoBehaviour { | |||||
public KeyCode wireFrameKey; | |||||
public bool wireFrameMode; | |||||
public void Start() | |||||
{ | |||||
} | |||||
void OnPreRender() { | |||||
if(wireFrameMode) | |||||
GL.wireframe = true; | |||||
else | |||||
GL.wireframe = false; | |||||
} | |||||
void Update() | |||||
{ | |||||
if(Input.GetKeyDown(wireFrameKey)) | |||||
wireFrameMode = !wireFrameMode; | |||||
} | |||||
} |
@ -1,12 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: c5b6163b8ecae2943a2987cdfcf329af | |||||
timeCreated: 1456400616 | |||||
licenseType: Store | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 3f3a3636cf5c0964ab5e2d146c918468 | |||||
guid: f87a054963b01dc4c8aa2e3ffedcca21 | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 5e4429404ec80d8408c142d1f3784b16 | |||||
guid: 7da0e8d0a6415f944aa43dff57b38ae3 | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: c207356b78ec8e8499bb6047218dd104 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |