unity中js脚本与c#脚本互相调用 test1.js function OnGUI() { if(GUI.Button(Rect(25,25,100,30),"JS Call CS" )) { var c = gameObject.GetComponent("test2"); c.PrintTest(); } } function testPrint() { print("CS Call JS"); } test2.cs using Un
第一步:编写bat文件 方法1:php方法 方法2:exploere浏览器 电脑上新建一个txt文本,把代码放进去.然后把他另存为xxx.bat explorer "http://网址/e/dongpo/sitemap/auto.php?tabname=news" 注意:这里代码会执行两次,必须要管理浏览器才行(关闭,只执行一次代码) 关闭浏览器代码 <script> closewin(); function closewin(){ var browserName=nav
好久没碰c#了,偶尔需要制作点小工具.为了一个灵活的架构设计,需要对继承/多态有比较深刻的理解. 不料忘得差不多了,好吧,再来回忆下.直接上代码了,如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestInherit { class A { public A() { Console.WriteLine("==constructor of A==