~ 2D mouse click on unity ~

Post on (2017.03.03) |unity | No Comments

在要hit test的gameobject內加入Box Collider 2D

01

 // Update is called once per frame
    void Update() {
        if (Input.GetMouseButtonDown(0))
        {
            print("mousedown");

            RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);

            if (hit.collider != null)
            {
                print(hit.collider.gameObject.name);
            }
        }
    }

 

compile a apk , and go to

C:\{unityProject}/Temp/StagingArea/AndroidManifest.xml
copy to unity->Assets/Plugins/Android

upgrade from jdk 1.7 to 1.8

edit->preference->external Tools->JDK->1.8

 

去pfsense -> vpn->openvpn -> wizards

1487131076245

type of server>local User Access

1487131090075

Create CA Cert, Descriptive name 是旦打,全部野可以是旦打,self cert 沒問題

1487131152320

Create Server Cert , 尼個descriptive name 好重要,唔可以打重,可以打IP, 最好打domain ,如果轉左ip可以唔屎gen過張cert

1487131345012

Interface wan , protocol tcp or udp 都得,port 都係,自行開port

1487131468356

Tunnel Network 即係你vpn後的IP subnet,隨意打,唔好同local network撞, local network 就係你要join入去既subnet, 如果唔想vpn後join入lan 就空左佢

1487131515213

1487131596573

1487134672417

1487131616259

之後去Inferface->assign->add opt1or opt2 尼張係openvpn既interface

1487133035213

要enable,同set IPv4 DHCP

1487134625736

Interface->bridge->add->用 shift ctril merge 2張interface (1張係vpn, 1張係local network)

1487133092382

之後add返張bridge左既interface,enable 同 DHCP

1487133107686

firewall 加返bridge 同opt2 既firewall rules set any

1487134701466

之後去download plugin>system>packageManager>available Packages>openvpn-client-export

1487131644388

之後去system>user>maneager>users到開vpn acc

1487131728177

記得click create cert

1487131747374

之後返去vpn->openvpn->export client->standard config->archive 整個dl就行

1487131797156

因為coding 問題,另shellscript 不能正確運行DOS format VS UNIX

qq%e6%88%aa%e5%9c%9620161117161746

apt-get install dos2unix
dos2unix file.sh

 

Plex media server 不能import 某些video是因為如選取movie 或tv movie 的library

filename必需要用特定的,如上網下載的video則要rename才可以import到plex media server

另一個方法就是增加一個Home videos的library, 在這library內的video不用特定格式也會import

1478887082336

1478887099897

1478887119478

如果freenas內的jail玲唔到IP,原因係因為jail 內的network 沒有pass through 到上層的network

所以變到只有freenas同jail可以溝通,上層的network則不可以連接

方法先到freenas內create一個network interface比jail用
Network>interfaces->add interface

qq%e5%9c%96%e7%89%8720161111120404

如果上層本身有dhcp 則不用tick DHCP也不用set ip ,只create 一個像switch功能的nic就可以

qq%e5%9c%96%e7%89%8720161111120432

之後edit Jail 可以加static IP,按advanced mode

qq%e5%9c%96%e7%89%8720161111120534

untick VIMAGE,如果不untick則不可以選擇NIC,然後加返NIC入去就行了。

qq%e5%9c%96%e7%89%8720161111120606

~ centos epel error ~

Post on (2016.11.07) |centos | No Comments
yum check-update(如果有問題)
yum --disablerepo="epel"  check-update(而尼個無問題)

可以log error 去txt

URLGRABBER_DEBUG=1 yum check-update 2> debug.log

如見到有CA cert問題,方法係斬左舊有既CA cert再reinstall 新的
(但因為epel error ,所以必去用disable mode 尼del

yum --disablerepo="epel" reinstall ca-certificates
yum --disablerepo="epel" update ca-certificates

然後再 yum check-update 看看

Select boot option -> click Foce BIOS setup(The next time …….)
then using +/- to set the boot order in BIOS

%e6%93%b7%e5%8f%96 %e6%93%b7%e5%8f%962

~ Hosts file location ~

Post on (2016.10.20) |Linux | No Comments

Win7
C:\Windows\System32\drivers\etc
linux
/etc/hosts

« Previous Page | Next Page »

Smiley face

May 2026
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
晴晴兔的少女回憶 =3=~ All rights reserved.