Рубрики
Unity "Установка"

Unity — подключение git

  • GitHub — новый репозиторий
    • btn New
    • Repository name
      • имя репозитория
    • Description
      • описание репозитория
    • доступность проекта в Интернете
      • radio btn Public
        • открытый проект
      • radio btn Private
        • закрытый проект
    • check Add a README file
      • добавить файл с более подробным описанием проекта
    • chek Add .gitignore
      • список не добавляемых файлов в GitHub
        • .gitignore  template: Unity
    • check Choose a license
      • добавление лицензии для этого проекта
  • GitHub Desktop — отправка файлов в GitHub
    • установка приложения
    • привязка аккаунта GitHub к приложению
      • File\Options
        • btn Accounts
          • раздел GitHub.com
            • btn Sign in
              • btn Continue with browser
                • btn Authorize desktop
    • клонирование репозитория (сделать локальным) с сайта GitHub
      • File\Clone repository…
        • раздел Your repositories
          • выбираем созданный репозиторий
        • local path
          • выбираем путь куда будет клонироваться
            • место проекта project
          • btn Choose…
        • btn Clone
    • первый Commit
      • отправить первую версию проекта на GitHub
        • обновить репозиторий
      • commit
        • название
        • текстовая строка
      • discription
        • подробное описание
      • btn Commit to main
      • btn Push origin
Рубрики
Unity Unity "Установка"

Unity C# — исправление кириллицы текста в файлах *.cs

  • в проекте открываем файл *.cs с помощью IDE Microsoft Visual Studio в Unity
    • копируем весь текст  без отсутствия ошибок кода
  • открытие того же файла *.cs с помощью NotePad++
    • Кодировки
      • Преобразовать UTF-8 c BOM
    • вставка скопированного текста кода, с полной заменой предыдущего
    • сохранение изменения файла *.cs
Рубрики
Surface

SurfaceOutputStandardSpecular

[post10644 surface]

struct SurfaceOutputStandardSpecular
{
    fixed3 Albedo;      // diffuse color
    fixed3 Specular;    // specular color
    fixed3 Normal;      // tangent space normal, if written
    half3 Emission;
    half Smoothness;    // 0=rough, 1=smooth
    half Occlusion;     // occlusion (default 1)
    fixed Alpha;        // alpha for transparencies
};
Рубрики
Surface Standard

SurfaceOutputStandard

  • выходная структура поверхностного шейдера
    встроенный код HLSL

[post10644 surface]

struct SurfaceOutputStandard

{
    fixed3 Albedo;      // base (diffuse or specular) color
    fixed3 Normal;      // tangent space normal, if written
    half3 Emission;
    half Metallic;      // 0=non-metal, 1=metal
    half Smoothness;    // 0=rough, 1=smooth
    half Occlusion;     // occlusion (default 1)
    fixed Alpha;        // alpha for transparencies
};
Рубрики
Custom Surface

«Объект красного цвета»

[post10644 surfaceshader]

#pragma surface surf Standard
Shader "Custom/SH_surf"
{
    SubShader
    {
        CGPROGRAM
        #pragma surface surf Standard
        sampler2D _MainTex;

        struct Input
        {
            float3 color : RED;
        };
        void surf (Input IN, inout SurfaceOutputStandard o)
        {
            o.Albedo = IN.color;
            o.Alpha = 1;
        }
        ENDCG
    }
}