<?php
$ui_style_default = _hui('ui_style_default', 'card');
$ui_color_default = _hui('ui_color_default', 'light');
$ui_user_switch = _hui('ui_user_switch', true);
$html_classes = array();
if ($ui_style_default) {
$html_classes[] = 'ui-style-' . $ui_style_default;
}
if ($ui_color_default) {
$html_classes[] = 'ui-color-' . $ui_color_default;
}
if (_hui('idark_default') || (_hui('idark') && _tb_is_dark())) {
$html_classes[] = 'darking';
}
$html_class_attr = $html_classes ? ' class="' . esc_attr(implode(' ', $html_classes)) . '"' : '';
$html_data_attr = (_hui('idark') && _tb_is_night()) ? ' data-night="1"' : '';
?>
<!DOCTYPE HTML>
<html lang="<?php echo tb_get_lang() ?>"<?php echo $html_class_attr . $html_data_attr; ?>>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-title" content="<?php echo get_bloginfo('name') ?>">
<meta http-equiv="Cache-Control" content="no-siteapp">
<script>
(function(){var a=<?php echo $ui_user_switch ? 'true' : 'false'; ?>,s="<?php echo esc_js($ui_style_default); ?>",c="<?php echo esc_js($ui_color_default); ?>",r=document.documentElement;if(r.classList.contains("ui-style-simple")){s="simple"}else if(r.classList.contains("ui-style-flat")){s="flat"}else if(r.classList.contains("ui-style-card")){s="card"}if(r.classList.contains("ui-color-dark")||r.classList.contains("darking")){c="dark"}else if(r.classList.contains("ui-color-light")){c="light"}if(a){var ls=localStorage.getItem("dux-ui-style"),lc=localStorage.getItem("dux-ui-color");if(ls){s=ls}if(lc){c=lc}}r.classList.remove("ui-style-simple","ui-style-card","ui-style-flat");r.classList.remove("ui-color-light","ui-color-dark");if(s){r.classList.add("ui-style-"+s)}if(c){r.classList.add("ui-color-"+c)}if(c==="dark"){r.classList.add("darking")}if(c==="light"){r.classList.remove("darking")}})();
</script>
<title><?php echo _title(); ?></title>
<?php wp_head(); ?>
<link rel="shortcut icon" href="<?php echo home_url() . '/favicon.ico' ?>">
</head>
<body <?php body_class(_bodyclass()); ?>>
<?php do_action('dux_header_before') ?>
<header class="header">
<div class="container">
<?php _the_logo(); ?>
<?php
$_brand = _hui('brand');
if ($_brand) {
$_brand = explode("\n", $_brand);
echo '<div class="brand">' . $_brand[0] . '<br>' . (isset($_brand[1]) ? $_brand[1] : '') . '</div>';
}
?>
<?php if( !_hui('idark_default') && _tb_idark() !== false ){ ?>
<div class="sitedark" etap="darking"><i class="tbfa"></i><i class="tbfa"></i></div>
<?php } ?>
<?php if (_hui('ui_user_switch', true) && _hui('ui_switcher_s', true)) { ?>
<div class="ui-switcher">
<div class="ui-switcher-group">
<button type="button" data-type="style" data-value="simple">简洁</button>
<button type="button" data-type="style" data-value="card">卡片</button>
<button type="button" data-type="style" data-value="flat">扁平</button>
</div>
<div class="ui-switcher-group">
<button type="button" data-type="color" data-value="light">浅色</button>
<button type="button" data-type="color" data-value="dark">暗色</button>
</div>
</div>
<?php } ?>
<?php if (!is_search() && ((_hui('pc_search') && !wp_is_mobile()) || (_hui('m_search') && wp_is_mobile()))) { ?>
<?php if(_hui('search_type_icon',true) || (!_hui('search_type_icon',true)&&_hui('m_search') && wp_is_mobile())){ ?>
<div class="navto-search search-show"><i class="tbfa"></i></div>
<?php }else{ ?>
<?php get_search_form() ?>
<?php } ?>
<?php } ?>
<ul class="site-nav site-navbar">
<?php _the_menu((wp_is_mobile() && has_nav_menu('nav_m')) ? 'nav_m' : 'nav') ?>
</ul>
<?php if (!_hui('topbar_off')) { ?>
<div class="topbar">
<ul class="site-nav topmenu">
<?php _the_menu('topmenu') ?>
<?php if (_hui('guanzhu_b')) { ?>
<li class="menusns menu-item-has-children">
<a href="javascript:;"><?php echo _hui('sns_txt') ?></a>
<ul class="sub-menu">
<?php if (_hui('wechat')) {
echo '<li><a class="sns-wechat" href="javascript:;" title="' . _hui('wechat') . '" data-src="' . _hui('wechat_qr') . '">' . _hui('wechat') . '</a></li>';
} ?>
<?php for ($i = 1; $i < 10; $i++) {
if (_hui('sns_tit_' . $i) && _hui('sns_link_' . $i)) {
echo '<li><a target="_blank" rel="external nofollow" href="' . _hui('sns_link_' . $i) . '">' . _hui('sns_tit_' . $i) . '</a></li>';
}
} ?>
</ul>
</li>
<?php } ?>
</ul>
<?php if (_hui('topbar_sign', 'on')) : ?>
<?php if (function_exists('tbm_on') && tbm_on()) : ?>
<?php do_action('tbm_sign_text', 'dux') ?>
<?php if (current_user_can('publish_posts')) { ?>
<a rel="nofollow" target="_blank" href="<?php echo site_url('/wp-admin/') ?>"><?php _e('后台管理', 'TBL') ?></a>
<a rel="nofollow" target="_blank" href="<?php echo site_url('/wp-admin/post-new.php') ?>"><?php _e('写文章', 'TBL') ?></a>
<?php if (is_single() || is_page()) { ?>
<?php edit_post_link(__('[编辑]', 'TBL')) ?>
<?php } ?>
<?php } ?>
<?php elseif (is_user_logged_in()) : global $current_user; ?>
<?php _moloader('mo_get_user_page', false) ?>
Hi, <?php echo $current_user->display_name ?>
<?php if (_hui('user_page_s')) { ?>
<a rel="nofollow" href="<?php echo mo_get_user_page() ?>"><?php _e('进入会员中心', 'TBL') ?></a>
<?php } ?>
<?php if (current_user_can('publish_posts')) { ?>
<a rel="nofollow" target="_blank" href="<?php echo site_url('/wp-admin/') ?>"><?php _e('后台管理', 'TBL') ?></a>
<a rel="nofollow" target="_blank" href="<?php echo site_url('/wp-admin/post-new.php') ?>"><?php _e('写文章', 'TBL') ?></a>
<?php if (is_single() || is_page()) { ?>
<?php edit_post_link(__('[编辑]', 'TBL')) ?>
<?php } ?>
<?php } ?>
<?php elseif (_hui('user_page_s')) : ?>
<a rel="nofollow" href="javascript:;" class="signin-loader"><?php _e('Hi, 请登录', 'TBL') ?></a>
<a rel="nofollow" href="javascript:;" class="signup-loader"><?php _e('我要注册', 'TBL') ?></a>
<a rel="nofollow" href="<?php echo mo_get_user_rp() ?>"><?php _e('找回密码', 'TBL') ?></a>
<?php else : ?>
<a rel="nofollow" href="<?php echo esc_url(wp_login_url(get_permalink())) ?>"><?php _e('Hi, 请登录', 'TBL') ?></a>
<a rel="nofollow" href="<?php echo wp_registration_url() ?>"><?php _e('我要注册', 'TBL') ?></a>
<a rel="nofollow" href="<?php echo wp_lostpassword_url() ?>"><?php _e('找回密码', 'TBL') ?></a>
<?php endif; ?>
<?php endif; ?>
</div>
<?php } ?>
<?php if (_hui('user_page_s') || (function_exists('tbm_on') && tbm_on())) { ?>
<?php if (!is_user_logged_in()) { ?>
<?php if (function_exists('tbm_on') && tbm_on()) : ?>
<a rel="nofollow" href="javascript:;" class="m-icon-user" tbm-event="login"><i class="tbfa"></i></a>
<?php else : ?>
<a rel="nofollow" href="javascript:;" class="signin-loader m-icon-user"><i class="tbfa"></i></a>
<?php endif; ?>
<?php } else { ?>
<?php _moloader('mo_get_user_page', false) ?>
<a rel="nofollow" href="<?php echo mo_get_user_page() ?>" class="m-icon-user"><i class="tbfa"></i></a>
<?php } ?>
<?php } ?>
</div>
</header>
<?php if (_hui('m_navbar')) { ?>
<div class="m-icon-nav">
<i class="tbfa"></i>
<i class="tbfa"></i>
</div>
<?php } ?>
<div class="site-search">
<div class="container">
<?php get_search_form() ?>
</div>
</div>
<?php if (is_single() && _hui('breadcrumbs_single_s') && hui_breadcrumbs()) { ?>
<div class="breadcrumbs">
<div class="container"><?php echo hui_breadcrumbs() ?></div>
</div>
<?php } ?>
<?php
$ads_site_01_on = true;
if (is_page_template('pages/navs.php') || is_page_template('pages/user.php') || is_page_template('pages/resetpassword.php')) {
$ads_site_01_on = false;
}
$ads_site_01_on && _the_ads($name = 'ads_site_01', $class = 'orbui-site orbui-site-01');
?>
<?php do_action('dux_header_after') ?>
Beginning Unity Editor Scripting: Create and Publish Your Game Tools
by: Benny Kok
Publisher Finelybook 出版社: Apress; 1st ed. edition (July 21,2021)
Language 语言: English
Paperback: 284 pages
ISBN-10: 1484271661
ISBN-13: 9781484271667
Book Description
From the Back Cover
Learn about editor scripting in Unity,including different possible methods of editor customization to fit your custom game workflow or even to create assets that could be published on the Asset Store to earn a passive income. The knowledge of editor scripting,although rarely covered in books,gives a game developer insight into how things work in Unity under the hood,which you can leverage to create custom tools that empower your unique game idea.
This book starts with the very basics of editor scripting in Unity,such as using built-in attributes to customize your component’s editor and creating custom editors and windows with IMGUI and UI Toolkit. Next,we move to a general use case example by: creating an object spawner EditorTool for the scene view. Later,we dive straight to in-depth stats and detailed case studies of two Unity assets: ProArray and Rhythm Game Starter. Here you’ll get more context on how editor scripting is used in published assets.
You will also learn how to set up a better workflow for editor scripting,asset publishing,maintenance,and iterative updates. You will leverage the power of modern web technology to build a documentation site with Git Book and DocFX. Finally,you will see some tips and tricks for automating asset versioning and changelogs.
You will:
Get started with Editor scripting in Unity
Work with advanced editor topics such as custom EditorWindows and EditorTool
Structure your C# code with namespaces and asmdef
Use IMGUI and UI Toolkit for creating editor GUIs
Master packaging and selling your own editor tools
Set up a better workflow for asset publishing,maintenance,and iterative updates
About the Author
BennyKok is primarily a Unity asset publisher,indie game developer,and music producer. He is a creative individual who loves creating tools for Unity and published ProArray and Rhythm Game Starter on the Unity Asset Store. He also dedicates his time to sharing open-source Unity tools on GitHub for the community
上一篇Basic Statistics with R: Reaching Decisions with Data
下一篇Gourmet Vim: A Cookbook: A collection of 200+ Vim recipes
觉得文章有用就打赏一下文章作者 您的打赏,我们将继续给力更多优质内容 支付宝扫一扫 微信扫一扫