Path环境变量

1、什么是环境变量:

path环境变量是用于记住程序路径,方便在命令行窗口cmd中的任意目录启动程序。

注:一般在cmd中启动某程序时,需要先在cmd中将目录转到该程序所在目录(保存路径),然后才可以启动该程序。如果cmd中的目录不是该程序的所在目录,则启动时会报错。

举例如下:在cmd中启动名为PotPlayerMini的视频播放器程序,此时cmd中的目录并不是该程序的所在路径,启动则报错如下:

2、为什么要配置path环境变量

当我们在cmd中启动程序时,系统会根据以下规则去寻找并启动程序:

1.系统首先会在cmd中的当前目录下搜索该程序并启动,如果cmd的当前目录下 有 该程序,则该程序被启动;

2.如果cmd的当前目录下 没有 该程序,则系统会进入环境变量中path条目中搜索该程序所在目录(保存路径),如果path中添加了该程序的所在目录(保存路径),则该程序被启动;

3.如果path中 没有 添加该程序的所在目录(保存路径),则系统此次搜索结果是未找到该程序,则会报错,程序不被启动。

举例如下:PotPlayerMini程序保存目录(保存路径)是在G盘的potplayer文件夹下,

然后我们将该目录添加到path环境变量中,如下:

 

然后我们再新打开一个cmd窗口,启动PotPlayerMini:

此时cmd中的当前目录并不是PotPlayerMini程序的所在目录(保存路径),但该程序可以被启动。

即:将某个程序的所在目录(保存路径)添加到path环境变量中后,我们便可以在cmd中的任意目录下启动该程序。

注意:当我们新增了一个path变量后,需要点击确定以进行保存,然后需要重新打开一个新的cmd窗口。如果是在添加path变量前打开的cmd窗口,则新增的path变量在该cmd窗口内不会生效。

3、如何配置环境变量

1 先找到 此电脑(我的电脑),如何点击鼠标右键,在弹出的子菜单中鼠标左键点击 属性 :

 

2 然后点击 高级系统设置

 

3 然后在高级选项中点击 环境变量 ,

 

4 然后在 系统变量 中单击Path选中,然后点击 编辑 ,

 

5 然后在弹出的 编辑环境变量窗口中点击 新建 ,然后输入需要添加的变量(路径),然后点击 确定 关闭 编辑环境变量 窗口,然后点击 确定 关闭环境变量窗口, 然后点击 确定 关闭系统属性窗口。

3.1 用户变量和系统变量的区别

在配置环境变量时,在 环境变量 窗口内有一个 用户变量 和一个 系统变量 ,且两个变量中都有path,且两个path中都可以添加变量,他们的区别如下:

在一台电脑中,一个Windows系统我们可以登录不同Windows账号,即同一台电脑可以被多个Windows用户使用。

当我们在 用户变量 中的path中添加环境变量后,则该变量只对我们当前登录的Windows账号生效,当我们换一个Windows账号登录时,则该变量不会生效。

当我们在 系统变量 中的path中添加环境变量后,该变量会对此电脑的所有Windows用户生效。

  • 37
    点赞
  • 141
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Whether you are making a road, a ramp, a path or a river, Path Painter makes terrain based path creation and texturing a breeze! Path Painter allows you to: - Create paths; - Create ramps; - Create roads; - Create plateaus for secret forts; - Create lake and river beds; - Change terrain elevation along path; - Re-texture along path embankments; - Clear grass and trees along path; - Use various algorithms for natural clearing; - Standard Unity terrain compatible! Path Painter is a collaboration between Frank Slater and Procedural Worlds, and we are very excited to be working together. Note: This asset is provided in DLL form rather than with source code. If you would also like to purchase the source then please contact us directly. Our Product Suite: Gaia - A world generation system for creating, texturing, planting and populating scenes from low poly mobile, VR and through to high end desktop. GeNa 2 - A sophisticated localised level design tool that augments Gaia’s broad brush strokes, by working intuitively to give fine grained control. Path Painter - A powerful path and easy to use road, path and river bed painting system for Unity 3D. CTS - Nominated by Unity of as one of the best assets in 2017, a PBR terrain shading system that significantly improves terrain look, performance and usability. SECTR - A suite of performance-enhancing tools that enable open world streaming, massive mobile games and includes the latest techniques in audio occlusion and propagation. Pegasus - A system that can drive anything along a path. Great for cut-scenes, and even has an ambient ai that supports formations, animation and local avoidance for your npc's and animals! Want To Know More ? Unity Forum Path Painter Tutorials Have A Chat Ticketed Support NOTE: Path Painter does not create meshes, so if you are making rivers you would typically also use another tool as well to shade the river component.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值