Skip to content

Instantly share code, notes, and snippets.

View dimmduh's full-sized avatar
🎮
Learning Unity

Dmitrii Dukhnich dimmduh

🎮
Learning Unity
View GitHub Profile
This file has been truncated, but you can view the full file.
LICENSE SYSTEM [2018729 14:25:19] Next license update check is after 2018-06-08T08:14:16
Built from '2018.2/staging' branch; Version is '2018.2.0f2 (787658998520) revision 7894616'; Using compiler version '191225831'
OS: 'Windows 7 (6.1.0) 64bit' Language: 'ru' Physical Memory: 32704 MB
BatchMode: 0, IsHumanControllingUs: 1, StartBugReporterOnCrash: 1, Is64bit: 1, IsPro: 0
[Package Manager] Server::Start -- Port 31154 was selected
ListPackages failed, output: {
"name": "unity-editor",
"version": "5.7.0",
@dimmduh
dimmduh / mainTemplate.gradle
Last active June 15, 2018 06:50
Unity gradle custom template with multidex
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}
@dimmduh
dimmduh / Ball.cs
Created June 14, 2018 16:28
unity example - ball jump
using UnityEngine;
public class Ball : MonoBehaviour
{
private Rigidbody rb;
[Header("Jumping")]
public Vector3 jumpForce = Vector3.up;
public float jumpTimeout = 0.1f;
@dimmduh
dimmduh / TilingTexture.shader
Last active April 18, 2018 04:33 — forked from alexshikov/TilingTexture.shader
Tiling shader for Unity3D 5.3.x (material tiling is broken in 5.3.4f1 for some reason) + transparent
Shader "Unlit/Tiling Transparent Texture"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_Tiling ("Tiling", Vector) = (1, 1, 0, 0)
}
SubShader
{
Tags
@dimmduh
dimmduh / run.sh
Created February 6, 2018 03:30
How to update gitlab - ubuntu 16 - whne package 'gitlab-ce' has no installation candidate
copy text from
https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.list?os=Ubuntu&dist=xenial&source=script
put to
nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list
update
gitlab-rake gitlab:backup:create STRATEGY=copy
apt-get update && sudo apt-get install gitlab-ce
@dimmduh
dimmduh / .gitignore
Created February 6, 2018 02:32
My unity gitignore
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
# Visual Studio 2015 cache directory
/.vs/
@dimmduh
dimmduh / flat_array.php
Created February 1, 2018 14:44
php - make multidimensional array to flat array path => value
<?php
function flat_array($array, $delimiter = '/')
{
$result = [];
foreach ($array as $key => $value) {
if (is_array($value)) {
$subResult = flat_array($value, $delimiter);
foreach ($subResult as $subKey => $subValue) {
$result[$key . $delimiter . $subKey] = $subValue;
}
@dimmduh
dimmduh / InspectorLabelEditor.cs
Created October 6, 2017 07:31
Label for inspector. Put to Editor folder
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class InspectorLabel : MonoBehaviour
{
}
@dimmduh
dimmduh / LLApi MessagesConsumer.cs
Created October 5, 2017 07:19
Unity LLApi MessagesConsumer.cs
public void Start()
{
Disconnect = false;
//@todo tune params!
var gConfig = new GlobalConfig
{
ThreadPoolSize = threadPoolSize,
MaxPacketSize = maxPacketSize
};
@dimmduh
dimmduh / tank_rotation.cs
Created October 4, 2017 10:46
Unity tank rotation
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tank : MonoBehaviour
{
public Transform cabina;
public Transform dulo;